[MOD][DEV] Vertical CRT-off Animation [JOP40C] - Android Themes

This mod is originally posted on Galaxy Nexus theme forum :
[MOD] Vertical CRT-off Animation
----------------------------------------------------------------------------
Preview :
Default(horizontal) crt-off animation looks similar to this when tablet is in landscape mode..
and I think that is interesting, so I made this mod.
----------------------------------------------------------------------------
Source code (diff) for JOP40C : download
Code:
diff -rupN ./a/services/java/com/android/server/power/ElectronBeam.java ./b/services/java/com/android/server/power/ElectronBeam.java
--- ./a/services/java/com/android/server/power/ElectronBeam.java 2012-11-26 00:42:43.578341000 +0900
+++ ./b/services/java/com/android/server/power/ElectronBeam.java 2012-11-25 23:33:15.559177000 +0900
@@ -60,8 +60,8 @@ final class ElectronBeam {
// The relative proportion of the animation to spend performing
// the horizontal stretch effect. The remainder is spent performing
// the vertical stretch effect.
- private static final float HSTRETCH_DURATION = 0.5f;
- private static final float VSTRETCH_DURATION = 1.0f - HSTRETCH_DURATION;
+ private static final float VSTRETCH_DURATION = 0.5f;
+ private static final float HSTRETCH_DURATION = 1.0f - VSTRETCH_DURATION;
// The number of frames to draw when preparing the animation so that it will
// be ready to run smoothly. We use 3 frames because we are triple-buffered.
@@ -343,16 +343,16 @@ final class ElectronBeam {
}
private static void setVStretchQuad(FloatBuffer vtx, float dw, float dh, float a) {
- final float w = dw + (dw * a);
- final float h = dh - (dh * a);
+ final float w = dw - (dw * a);
+ final float h = dh + (dh * a);
final float x = (dw - w) * 0.5f;
final float y = (dh - h) * 0.5f;
setQuad(vtx, x, y, w, h);
}
private static void setHStretchQuad(FloatBuffer vtx, float dw, float dh, float a) {
- final float w = dw + (dw * a);
- final float h = 1.0f;
+ final float w = 1.0f;
+ final float h = dw + (dw * a);
final float x = (dw - w) * 0.5f;
final float y = (dh - h) * 0.5f;
setQuad(vtx, x, y, w, h);
----------------------------------------------------------------------------

It' s incredible the job that you are doing to the android community! Thanks!

this is awesome, but sadly didnt work with cm10 M2 on att gs3. maybe ill flash it again after a full wipe, but for the moment, i still have a horizontal crt animation. awesome work nonetheless.

Man you are a legend
Sent from my GT-I9100 using Tapatalk 2

Only for AOSP and cm10? How about other JB custom roms like codename android? will this work?

Fixed
updater-script in all flashable zip files are fixed. Now it will not cause flashing error on any devices. (sorry!)
marshygeek said:
Only for AOSP and cm10? How about other JB custom roms like codename android? will this work?
Click to expand...
Click to collapse
Sorry but I don't know... I can't test this on all custom roms. Try with CM10 version and if it doesn't work, flash your rom again without wiping data.

tried it for the sake of trying on my skyrocket running paranoid android ...... wouldnt boot past the samsung splash ...... had to recover
awesome mod tho
edit: i tried the cm10 cwm zip version, didnt try anything else

Don't work with AOKP I9100.. Try to patch by myself..

Doesn't work with Galaxy R I9103..Not a famous device but it's high end..Pls look into it...
Sent from my GT-I9103 using Tapatalk 2

Added Flashable zip for AOKP build 5 in OP..
and sorry but I have GNex only so I'm not sure whether or not same files work on other devices..

Dude can you make a tutorial of this on smali?
Sent from my Galaxy Nexus

mixtapes08 said:
Dude can you make a tutorial of this on smali?
Click to expand...
Click to collapse
This mod is related to lib file. (libsurfaceflinger.so) So if you want other method, you have to hex edit that file.
Maybe not that difficult but sorry, I don't know how to do it..

evilisto said:
Added Flashable zip for AOKP build 5 in OP..
and sorry but I have GNex only so I'm not sure whether or not same files work on other devices..
Click to expand...
Click to collapse
I think EVERYONE will appreciate everything a lot more when they see this.....
http://forum.xda-developers.com/showpost.php?p=31648393&postcount=690
Your welcome
Transmitted from my GALAXYSIII running Jelly Bean. XDA premium

ManOnTheMoon said:
I think EVERYONE will appreciate everything a lot more when they see this.....
http://forum.xda-developers.com/showpost.php?p=31648393&postcount=690
Your welcome
Transmitted from my GALAXYSIII running Jelly Bean. XDA premium
Click to expand...
Click to collapse
Can you make a tutorial on how to do this with evilisto's patch...
Sent from my Galaxy Nexus

anyway how to revert back to usual crt after installing your mod?

vertrag said:
anyway how to revert back to usual crt after installing your mod?
Click to expand...
Click to collapse
Replace /system/lib/libsurfaceflinger.so with your rom's original file.
or just flash rom again without wiping.

Updated
OP updated for 4.2 JellyBean rom (JOP40C).

cant figure this out...
evilisto said:
This mod is originally posted on Galaxy Nexus theme forum :
[MOD] Vertical CRT-off Animation
----------------------------------------------------------------------------
Preview :
Default(horizontal) crt-off animation looks similar to this when tablet is in landscape mode..
and I think that is interesting, so I made this mod.
----------------------------------------------------------------------------
Source code (diff) for JOP40C : download
Code:
diff -rupN ./a/services/java/com/android/server/power/ElectronBeam.java ./b/services/java/com/android/server/power/ElectronBeam.java
--- ./a/services/java/com/android/server/power/ElectronBeam.java 2012-11-26 00:42:43.578341000 +0900
+++ ./b/services/java/com/android/server/power/ElectronBeam.java 2012-11-25 23:33:15.559177000 +0900
@@ -60,8 +60,8 @@ final class ElectronBeam {
// The relative proportion of the animation to spend performing
// the horizontal stretch effect. The remainder is spent performing
// the vertical stretch effect.
- private static final float HSTRETCH_DURATION = 0.5f;
- private static final float VSTRETCH_DURATION = 1.0f - HSTRETCH_DURATION;
+ private static final float VSTRETCH_DURATION = 0.5f;
+ private static final float HSTRETCH_DURATION = 1.0f - VSTRETCH_DURATION;
// The number of frames to draw when preparing the animation so that it will
// be ready to run smoothly. We use 3 frames because we are triple-buffered.
@@ -343,16 +343,16 @@ final class ElectronBeam {
}
private static void setVStretchQuad(FloatBuffer vtx, float dw, float dh, float a) {
- final float w = dw + (dw * a);
- final float h = dh - (dh * a);
+ final float w = dw - (dw * a);
+ final float h = dh + (dh * a);
final float x = (dw - w) * 0.5f;
final float y = (dh - h) * 0.5f;
setQuad(vtx, x, y, w, h);
}
private static void setHStretchQuad(FloatBuffer vtx, float dw, float dh, float a) {
- final float w = dw + (dw * a);
- final float h = 1.0f;
+ final float w = 1.0f;
+ final float h = dw + (dw * a);
final float x = (dw - w) * 0.5f;
final float y = (dh - h) * 0.5f;
setQuad(vtx, x, y, w, h);
----------------------------------------------------------------------------
Click to expand...
Click to collapse
cant figure this out... : ( where do i edit this? 4.1.2 Custom Rom here

Related

Android Code: Downloading from within an app

I've searched the android website but I cannot find any sample code that will allow you to download something from a webpage/website. I'm trying to create a simple application that will allow you to download a podcast from a website straight onto the phone's sdcard. Any help is appreciated. Thanks!
[Edit]: I've found http://developer.android.com/reference/android/webkit/DownloadListener.html it seems right but I'm still a beginner and not sure how to apply the code / modify it and where to place it.
Networking is a big series of tests. Just about everything needs to be within a try/catch block, and you need to think of and test every possible contingency. Without doing that, you WILL get crashes and ugliness.
It is not the simplest thing for a newb to implement.
The SECOND thing you need to note is that WEBKIT is not what you want to mess with for *pure downloads*. If you just want to pull a file and do something manual with it, you do NOT want to be messing with an html rendering engine (that's what webkit is...).
Third, network requests should be done in a SEPARATE THREAD from the UI, otherwise it will result in a terrible user experience, ANR's, and general appearance of FREEZUPS.
You can try some of this:
Code:
public class HTTPGetData {
private byte[] data;
public HTTPGetData(){
}
public byte[] toByteArray(){
return data;
}
public void getViaHttpConnection(String url) throws IOException{
HttpClient httpClient = new DefaultHttpClient();
Log.d("***HTTPGetData",url);
HttpGet request = new HttpGet(url);
request.addHeader("Accept-Encoding", "gzip");
HttpResponse response;
try {
response = httpClient.execute(request);
boolean gzip = false;
if (response.containsHeader("Content-Encoding")){
Header[] headers = response.getHeaders("Content-Encoding");
for (int i=0; i<headers.length; i++){
if (headers[i].getValue().compareToIgnoreCase("gzip")==0) gzip = true;
}
}
int status = response.getStatusLine().getStatusCode();
// we assume that the response body contains the error message
if (status != HttpStatus.SC_OK) {
ByteArrayOutputStream ostream = new ByteArrayOutputStream();
response.getEntity().writeTo(ostream);
Log.e("HTTP_CLIENT", ostream.toString());
throw new IOException("HTTP response code: " + status);
} else {
int len = (int)response.getEntity().getContentLength();
InputStream content;
if (gzip) content = new GZIPInputStream(response.getEntity().getContent());
else content = response.getEntity().getContent();
if (len>0 && !gzip){
byte[] theData = new byte[len];
int rec = 0;
int cread = 0;
boolean fail=false;
while (rec < len){
if ((cread=content.read(theData, rec, len-rec))==0){
Log.e("HTTP_CLIENT","Short");
fail=true;
break;
}
rec+=cread;
}
if (!fail) data=theData;
} else {
int ch;
ByteVector bv = new ByteVector(1000);
while ((ch = content.read()) != -1){
bv.add((byte)ch);
}
data = bv.toByteArray();
}
content.close(); // this will also close the connection
}
} catch (ClientProtocolException e) {
Log.e("HTTP_CLIENT","ClientProtocolException");
throw new IOException("ClientProtocolException caught in HTTPGetData.getViaHttpConnection(String url)");
} catch (IOException e) {
Log.e("HTTP_CLIENT","IOException");
throw new IOException("IOException caught in HTTPGetData.getViaHttpConnection(String url)");
}
}
}
What you can do with that is something like this;
try{
HTTPGetData hgd = new HTTPGetData();
hgd.getViaHttpConnection("http://someurl");
//open file and dump in hgd.toByteArray();
catch(IOException e){
//do something with e
}
... and of course, put that in some new thread and while its running, make something spin to give the user the impression of progress.
Thanks lb. I don't really understand perfectly but I will look up the stuff I do not understand. Thanks for the help

[Q] [REQUEST] Fix for SSL Issue

Hi! In GB there is an issue about ssl. Google has accepted it and says that it will solved in a future release (2.3.4) but let us the code for a patch in custom rom.
Any developer could be interested in it? (please)
Here is the link: https://code.google.com/p/android/issues/detail?id=15356
(comment n. 6) It is described for nexus one, but i attest it on i9000
Thanks a lot and sorry for my poor english.
+1 looks like this is necessary if you're setting up ActiveSync and it's the fix is obvious:
diff --git a/patches/small_records.patch b/patches/small_records.patch
index f5f2286..a2ea51c 100644
--- a/patches/small_records.patch
+++ b/patches/small_records.patch
@@ -157,7 +157,7 @@
+ /* If we receive a valid record larger than the current buffer size,
+ * allocate some memory for it.
+ */
-+ if (rr->length > s->s3->rbuf.len - SSL3_RT_HEADER_LENGTH)
++ if (rr->length > s->s3->rbuf.len - SSL3_RT_HEADER_LENGTH - align)
+ {
+ if ((p=OPENSSL_realloc(s->s3->rbuf.buf, rr->length + SSL3_RT_HEADER_LENGTH + align))==NULL)
+ {
diff --git a/ssl/s3_pkt.c b/ssl/s3_pkt.c
index 51f21e0..c9ef2cd 100644
--- a/ssl/s3_pkt.c
+++ b/ssl/s3_pkt.c
@@ -359,7 +359,7 @@ fprintf(stderr, "Record type=%d, Length=%d\n", rr->type, rr->length);
/* If we receive a valid record larger than the current buffer size,
* allocate some memory for it.
*/
- if (rr->length > s->s3->rbuf.len - SSL3_RT_HEADER_LENGTH)
+ if (rr->length > s->s3->rbuf.len - SSL3_RT_HEADER_LENGTH - align)
{
if ((p=OPENSSL_realloc(s->s3->rbuf.buf, rr->length + SSL3_RT_HEADER_LENGTH + align))==NULL)
{
The simplest solution would be for someone to compile AOSP libssl.so with the patch and redistribute this library with a simple ADB script to get it running on your phone. Presumably you'll need root though. A complete custom ROM isn't really necessary.
That would be great! If not i must go 2.2.1 again. I only can acceda exchange work via activesync.
I think must be more people with this issue.
Enviado desde mi GT-I9000 usando Tapatalk

Development team V2

Hello everyone,
I want to start again with a development team. After miroslav decided to finish the project on his own, I want to try it again. But this time with a real team Only with people who want to participate, and not just type make. Who wants to join?
miroslav_mm said:
So, I opened your eyes and showed real face our "superstar"!?
Ok! Let's stop this stupid discussion and continuous develop ROM.
At this moment I have main part:
Torchscreen +
BT (BT-calling) +
WiFi (need to test) +
Sensor +
GSM (Waiting call) +
Mobile Data +
Audio +
Vibrate +
HW + 3D ??? (need new kernel or port new 3D kernel driver (kgsl) (in progress))
usb storage ??? (only with special app (native in progress))
Camera ??? (in progress)
Video codec ??? (in progress)
Anyone doing something? Maybe fix some stuff?
Click to expand...
Click to collapse
He just want to clean his topic. Send him a PM.
I understand that but there is still no team. He just made his project open for patches. And I think, personally, a team could help the speed on development of a ROM So please join
Sent from my GT540 using Tapatalk
So join his team , and start patching?
wwenigma said:
So join his team , and start patching?
Click to expand...
Click to collapse
Since when does he have a team? What I know about it, is that he just made some kind of open-source project where you can add your own updates and where he gets no credit.
Sent from my GT540 using Tapatalk
I can help you with Java stuff!
I think miroslav_mm wants to release ICS under name of SWIFT-TEAM, with developer names in credits.... may you ask him about it?
Do not split guys...
Miroslav said that it's only him on the team...so i don't see any team there..if we are more than 1 guy in a team we can get faster a daily ROM for our Phones
rexes13 said:
Miroslav said that it's only him on the team
Click to expand...
Click to collapse
Jep, because PCF+MGP join then leave and jasper580 cant make neccessary steps... ask him. All two, ask him about it.
wwenigma said:
Jep, because PCF+MGP join then leave and jasper580 cant make neccessary steps... ask him. All two, ask him about it.
Click to expand...
Click to collapse
I can make nesseccary steps if I want, but I don't want to. I want to start cleaned up. That's why I created this topic. So:
If you want to join: welcome.
If you don't want to: stop spamming
@rexes13 Welcome to the team!
Sent from my GT540 using Tapatalk
Good news.
Yesterday I successfully ported 3d kernel driver (kgsl) from 35, so now we have full functionality kernel with OpenGL ES-CM 1.1.
So HW, 3D and other stuff with support OpenGL working, not excellent but working, need improve source code Surfaceflinger and HardwareDisplay.
Maybe next weak I will make new thread and publish first public test version, but all development moments we can discus here.
Before I need redownload all sources CM9 again. Yesterday I had the same error like in wwenigma and aaa801
Code:
target thumb C: libhardware_legacy <= hardware/libhardware_legacy/power/power.c
arm-linux-androideabi-gcc: ": No such file or directory
<command-line>: warning: missing terminating " character
and I dont know WTF, so delete all source tree. Maybe today will try download again and build again.
hell yeah! im just another non-dev member LOL sry
Need help!
Look on code:
Code:
//static int32_t msm_tscal_scaler = 65536;
static int32_t msm_tscal_xscale = 70046;
static int32_t msm_tscal_xoffset = -4191987;
static int32_t msm_tscal_yscale = 71735;
static int32_t msm_tscal_yoffset = -3004437;
this pointers for torch 320*240. So when I using that I need tap on 2mm high on icon for open something. This pointer need for screen calibration. Need find right pointer.
I can't find a logic in this numbers.
miroslav_mm said:
Need help!
Look on code:
Code:
//static int32_t msm_tscal_scaler = 65536;
static int32_t msm_tscal_xscale = 70046;
static int32_t msm_tscal_xoffset = -4191987;
static int32_t msm_tscal_yscale = 71735;
static int32_t msm_tscal_yoffset = -3004437;
this pointers for torch 320*240. So when I using that I need tap on 2mm high on icon for open something. This pointer need for screen calibration. Need find right pointer.
I can't find a logic in this numbers.
Click to expand...
Click to collapse
The offsets appear to have a ~4:3 ratio. It doesn't make sense though why it's x:y=4:3, and not the other way around, since the screen is usually 3:4(e.g. 320x480 or 240x320). Also, considering our screen is 320x480, which is a ratio of 1,5 and not 1,(3), I think those would be totally wrong for our phone. Maybe try to modify one of the two to match 1,5 ratio. E.g. make xoffset=-4506655. I don't know. :/
Please discuss development on your page. I want to make a dev team here
Sent from my GT540 using Tapatalk
deleted
10 character
This numbers working with this java code together:
]
Code:
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
// Read current values
final int xoffset = (readValue("xoffset")*240+480)/960;
final int yoffset = (readValue("yoffset")*320+460)/920;
final int xscale = readValue("xscale");
final int yscale = readValue("yscale");
view = new View(this) {
private int step = 1;
private int rawx1;
private int rawy1;
private int rawx2;
private int rawy2;
private void writeValue(String parameter, int value) {
try {
FileOutputStream fos = new FileOutputStream(new File("/sys/module/msm_touch/parameters/tscal_" + parameter));
fos.write(String.valueOf(value).getBytes());
fos.flush();
fos.getFD().sync();
fos.close();
} catch (FileNotFoundException e) {
e.printStackTrace();
} catch (IOException e) {
e.printStackTrace();
}
}
@Override
public boolean onTouchEvent(MotionEvent ev) {
if (ev.getAction() != MotionEvent.ACTION_UP)
return true;
if(step==1) {
rawx1 = ((int)ev.getRawX()*65536-xoffset+32768)/xscale;
rawy1 = ((int)ev.getRawY()*65536-yoffset+32768)/yscale;
if(rawx1<100 && rawy1<100)
step = 2;
} else if(step==2) {
rawx2 = ((int)ev.getRawX()*65536-xoffset+32768)/xscale;
rawy2 = ((int)ev.getRawY()*65536-yoffset+32768)/yscale;
if(rawx2>140 && rawy2>220)
step = 3;
} else {
int distx = rawx2 - rawx1;
int new_xscale = (140*65536 + distx/2)/distx;
int disty = rawy2 - rawy1;
int new_yscale = (220*65536 + disty/2)/disty;
int new_xoffset = 1;
new_xoffset += 50*65536-rawx1*new_xscale;
new_xoffset += 190*65536-rawx2*new_xscale;
new_xoffset /= 2;
new_xoffset = (new_xoffset*960+120)/240;
int new_yoffset = 1;
new_yoffset += 50*65536-rawy1*new_yscale;
new_yoffset += 270*65536-rawy2*new_yscale;
new_yoffset /= 2;
new_yoffset = (new_yoffset*920+160)/320;
// Pass new calibration to kernel
writeValue("xoffset", new_xoffset);
writeValue("yoffset", new_yoffset);
writeValue("xscale", new_xscale);
writeValue("yscale", new_yscale);
// Save calibraiton data to /data/system/pointercal
StringBuilder sb = new StringBuilder();
sb.append(new_xscale);
sb.append(" ");
sb.append(0);
sb.append(" ");
sb.append(new_xoffset);
sb.append(" ");
sb.append(0);
sb.append(" ");
sb.append(new_yscale);
sb.append(" ");
sb.append(new_yoffset);
sb.append(" ");
sb.append(65536);
App + ui input framework + kernel working together.
App - creation poinercal
ui input framework - reading pointercal send correct info to kernel
kernel touch driver - doing move.
Öhm, the touchscreen driver use a virtual square (320*320) to detect touch, stretched to a rectangle(320*480)?
mod: about calibration, http://code.google.com/p/openeve/issues/detail?id=91
jasper580 said:
Please discuss development on your page. I want to make a dev team here
Click to expand...
Click to collapse
I cant understand you! What do you mean? Do you wanna make new dev team? Working on my sources but without me?
I exactly want to ask that. Maybe he start from scratch, his github is near empty.

[MOD][HOWTO][v2] change ICS lockscreen animation to Honeycomb style (ripple)

New Version : much more honeycomb-like version
preview :
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
howto :
framework.jar
1) line 72~ : change animation speed.
Code:
// Tune-able parameters
private static final int CHEVRON_INCREMENTAL_DELAY = [B][COLOR="Blue"]800[/COLOR][/B];
private static final int CHEVRON_ANIMATION_DURATION = [B][COLOR="Blue"]4000[/COLOR][/B];
private static final int RETURN_TO_HOME_DELAY = 1200;
private static final int RETURN_TO_HOME_DURATION = 300;
2) line 305~ :
Code:
private void startChevronAnimation() {
final float r = mHandleDrawable.getWidth() * 0.4f;
final float chevronAnimationDistance = mOuterRadius * 0.9f;
final float from[][] = {
{mWaveCenterX - r, mWaveCenterY}, // left
{mWaveCenterX + r, mWaveCenterY}, // right
{mWaveCenterX, mWaveCenterY - r}, // top
{mWaveCenterX, mWaveCenterY + r} }; // bottom
final float to[][] = {
{mWaveCenterX - chevronAnimationDistance, mWaveCenterY}, // left
{mWaveCenterX + chevronAnimationDistance, mWaveCenterY}, // right
{mWaveCenterX, mWaveCenterY - chevronAnimationDistance}, // top
{mWaveCenterX, mWaveCenterY + chevronAnimationDistance} }; // bottom
mChevronAnimations.clear();
final float startScale = 0.5f;
final float endScale = 2.0f;
for (int direction = 0; direction < 4; direction++) {
for (int count = 0; count < mFeedbackCount; count++) {
to
Code:
private void startChevronAnimation() {
final float r = mHandleDrawable.getWidth() * 0.4f;
final float chevronAnimationDistance = mOuterRadius * 0.9f;
final float from[][] = {
{mWaveCenterX - r, mWaveCenterY}, // left
[B][COLOR="blue"]{mWaveCenterX, mWaveCenterY}, // right[/COLOR][/B]
{mWaveCenterX, mWaveCenterY - r}, // top
{mWaveCenterX, mWaveCenterY + r} }; // bottom
final float to[][] = {
{mWaveCenterX - chevronAnimationDistance, mWaveCenterY}, // left
[B][COLOR="blue"]{mWaveCenterX, mWaveCenterY}, // right[/COLOR][/B]
{mWaveCenterX, mWaveCenterY - chevronAnimationDistance}, // top
{mWaveCenterX, mWaveCenterY + chevronAnimationDistance} }; // bottom
mChevronAnimations.clear();
[B][COLOR="blue"]final float startScale = 0.3f;
final float endScale = 1.1f;[/COLOR][/B]
for (int direction = 0; direction < 4; direction++) {
for (int count = 0; count < mFeedbackCount; count++) {
you can change these values to your taste.
framework-res.apk
download resources (PNGs - WVGA only) :
http://www.mediafire.com/?ksnc84d04w96uv8
1) decompile framework-res.apk
2) delete /res/drawable/ic_lockscreen_outerring.xml
3) add resource PNGs to /res/drawable-****/
4) open /layout/keyguard_screen_tab_unlock.xml
from :
Code:
<RelativeLayout android:layout_width="fill_parent" android:layout_height="302.0dip">
<com.android.internal.widget.multiwaveview.MultiWaveView android:orientation="horizontal" android:id="@id/unlock_widget" android:layout_width="fill_parent" android:layout_height="fill_parent" android:layout_alignParentBottom="true" android:targetDescriptions="@array/lockscreen_target_descriptions_with_camera" android:directionDescriptions="@array/lockscreen_direction_descriptions" android:targetDrawables="@array/lockscreen_targets_with_camera" android:handleDrawable="@drawable/ic_lockscreen_handle" android:rightChevronDrawable="@drawable/ic_lockscreen_chevron_right" android:waveDrawable="@drawable/ic_lockscreen_outerring" android:outerRadius="@dimen/multiwaveview_target_placement_radius" android:hitRadius="@dimen/multiwaveview_hit_radius" android:vibrationDuration="20" android:snapMargin="@dimen/multiwaveview_snap_margin" android:feedbackCount="3" android:verticalOffset="60.0dip" android:horizontalOffset="0.0dip" />
<TextView android:textAppearance="?textAppearanceMedium" android:textSize="@dimen/keyguard_lockscreen_status_line_font_size" android:textColor="?textColorSecondary" android:ellipsize="marquee" android:gravity="center_horizontal" android:id="@id/carrier" android:layout_width="fill_parent" android:layout_height="wrap_content" android:layout_marginBottom="12.0dip" android:singleLine="true" android:layout_alignParentBottom="true" />
</RelativeLayout>
to
Code:
<RelativeLayout android:layout_width="fill_parent" android:layout_height="[COLOR="Blue"]332.0dip[/COLOR]">
<com.android.internal.widget.multiwaveview.MultiWaveView android:orientation="horizontal" android:id="@id/unlock_widget" android:layout_width="fill_parent" android:layout_height="fill_parent" android:layout_alignParentBottom="true" android:targetDescriptions="@array/lockscreen_target_descriptions_with_camera" android:directionDescriptions="@array/lockscreen_direction_descriptions" android:targetDrawables="@array/lockscreen_targets_with_camera" android:handleDrawable="@drawable/ic_lockscreen_handle" android:rightChevronDrawable="@drawable/ic_lockscreen_chevron_right" android:waveDrawable="@drawable/ic_lockscreen_outerring" android:outerRadius="@dimen/multiwaveview_target_placement_radius" android:hitRadius="@dimen/multiwaveview_hit_radius" android:vibrationDuration="20" android:snapMargin="@dimen/multiwaveview_snap_margin" android:feedbackCount="[COLOR="Blue"]5[/COLOR]" android:verticalOffset="[COLOR="blue"]0.0dip[/COLOR]" android:horizontalOffset="0.0dip" />
<TextView [COLOR="blue"]android:visibility="gone"[/COLOR] android:textAppearance="?textAppearanceMedium" android:textSize="@dimen/keyguard_lockscreen_status_line_font_size" android:textColor="?textColorSecondary" android:ellipsize="marquee" android:gravity="center_horizontal" android:id="@id/carrier" android:layout_width="fill_parent" android:layout_height="wrap_content" android:layout_marginBottom="12.0dip" android:singleLine="true" android:layout_alignParentBottom="true" />
</RelativeLayout>
- remove carrier text is not essential..
5) open /res/values/arrays.xml :
from :
Code:
<array name="lockscreen_targets_with_camera">
<item>@drawable/ic_lockscreen_unlock</item>
<item>@null</item>
<item>@drawable/ic_lockscreen_camera</item>
<item>@null</item>
</array>
<array name="lockscreen_target_descriptions_with_camera">
<item>@string/description_target_unlock</item>
<item>@null</item>
<item>@string/description_target_camera</item>
<item>@null</item>
</array>
to:
Code:
<array name="lockscreen_targets_with_camera">
<item>@drawable/ic_lockscreen_unlock</item>
</array>
<array name="lockscreen_target_descriptions_with_camera">
<item>@string/description_target_unlock</item>
</array>
6) open /res/values/dimens.xml
from :
Code:
<dimen name="keyguard_lockscreen_outerring_diameter">270.0dip</dimen>
<dimen name="multiwaveview_target_placement_radius">135.0dip</dimen>
to :
Code:
<dimen name="keyguard_lockscreen_outerring_diameter">220.0dip</dimen>
<dimen name="multiwaveview_target_placement_radius">120.0dip</dimen>
7) recompile.
-----------------------------------------------------------------------------
Previous version :
this mod was originally posted in Nexus S theme forum.
[MOD][IMM26] change ICS lockscreen animation to honeycomb style
at first, i don't have any intention to write guide for this mod because i think the method is too stupid ..
but many people requested it so i wrote this simple guide.
-----------------------------------------------------------------------------
firstly, you have to edit lockscreen animation related code.
platform_frameworks_base/core/java/com/android/internal/widget/multiwaveview/MultiWaveView.java
1) line 72~
Code:
// Tune-able parameters
private static final int CHEVRON_INCREMENTAL_DELAY = 160;
private static final int CHEVRON_ANIMATION_DURATION = 850;
private static final int RETURN_TO_HOME_DELAY = 1200;
private static final int RETURN_TO_HOME_DURATION = 300;
to
Code:
// Tune-able parameters
private static final int CHEVRON_INCREMENTAL_DELAY = [B][COLOR="Blue"]480[/COLOR][/B];
private static final int CHEVRON_ANIMATION_DURATION = [B][COLOR="Blue"]3000[/COLOR][/B];
private static final int RETURN_TO_HOME_DELAY = 1200;
private static final int RETURN_TO_HOME_DURATION = 300;
2) line 305~ : same as above guide (new version).
-----------------------------------------------------------------------------
themes
: you have to replace lockscreen related PNGs in framework-res.apk.
framework-res.apk/res/drawable-hdpi or mdpi or xhdpi...
- ic_lockscreen_chevron_down.png
- ic_lockscreen_chevron_left.png
- ic_lockscreen_chevron_right.png (important)
- ic_lockscreen_chevron_up.png
and if you want, change lockscreen handle too.
- ic_lockscreen_handle_normal.png
- ic_lockscreen_handle_pressed.png
all my works are here (for hdpi).
1) default honeycomb ripple : http://www.mediafire.com/?7ktduz5dhsmzq6p
2) chrome logo :
download : http://www.mediafire.com/?osjng768zznfeh6
3) android logo
download : http://www.mediafire.com/?56sjs541bij3ygu
4) AT Field style (octagonal ripple)
download : http://www.mediafire.com/?t8lrdkr23nex7pc
5) Google Play logo
download : http://www.mediafire.com/?1vbc3ctdc7p94j4
-----------------------------------------------------------------------------
Bonus : wallpapers in preview videos
chrome logo (in first video) : [WALLPAPER] chrome logo wallpaper
modified phasebeam (in video 2, 3 and 4): [LWP] themed Phasebeam live wallpaper (4 versions)
Google Play logo (video 5) : [WALLPAPER] Google Play logo wallpaper
Thank you my friend....This is awesome!!!
question, since I always have to do things the hard way, in method one, what are you using to decompile and edit the jar? I had already found the timing part, but can't find the positioning.
Sent from my Nexus S 4G
shane6374 said:
question, since I always have to do things the hard way, in method one, what are you using to decompile and edit the jar? I had already found the timing part, but can't find the positioning.
Click to expand...
Click to collapse
i think compiling from source is much easier than editing smali file..
https://github.com/android/platform...ernal/widget/multiwaveview/MultiWaveView.java
Tnx!
Thanks Dude! Ill definitely get my hand over the Thanks button I'm gonna try it soon, when I have time
evilisto said:
i think compiling from source is much easier than editing smali file..
https://github.com/android/platform...ernal/widget/multiwaveview/MultiWaveView.java
Click to expand...
Click to collapse
Thanks, but i dont have the option to compile from source, but would like this edit... i am not on a AOKP, AOSP OR CM9 rom... any chance you could give me the actual lines to edit please? Would be much appreciated...
Sent from my Transformer TF101 using XDA Premium HD app
EDIT: Ok, I compared the two files, and well, there are many many differences in the edited one that you have provided. I will try to include that in my framework.jar and see how I get on there!
Thanks for your work here anyway!
Any way you can make flashable zip for the honeycomb ripple for CM9?
mattmanwrx said:
Thanks.
EDIT: Ok, I compared the two files, and well, there are many many differences in the edited one that you have provided. I will try to include that in my framework.jar and see how I get on there!
Thanks for your work here anyway!
Click to expand...
Click to collapse
Hi,
I swopped the multiwave smali file with the one you provided. And swopped over the chevron files from your HC style from the link in the first post, but it isnt centered...
(In fact, firstly it bootlooped, I then flashed a non modified framework.jar (as the one in my /system was already modified for the smoother scrolling and volume hack).
After flashing the non modified then the modified for this mod (including the smoother scrolling within the framework.jar), it booted up fine, but as I say, it isnt centered... Would you know why? attached is screen shots taken with ddms.bat
mattmanwrx said:
Hi,
I swopped the multiwave smali file with the one you provided. And swopped over the chevron files from your HC style from the link in the first post, but it isnt centered...
(In fact, firstly it bootlooped, I then flashed a non modified framework.jar (as the one in my /system was already modified for the smoother scrolling and volume hack).
After flashing the non modified then the modified for this mod (including the smoother scrolling within the framework.jar), it booted up fine, but as I say, it isnt centered... Would you know why? attached is screen shots with ddms.bat
Click to expand...
Click to collapse
Sorry but that sort of looks badass in the second picture..hahahaha Hope you get it working, is badass, I love it!!
mattmanwrx said:
Hi,
I swopped the multiwave smali file with the one you provided. And swopped over the chevron files from your HC style from the link in the first post, but it isnt centered...
(In fact, firstly it bootlooped, I then flashed a non modified framework.jar (as the one in my /system was already modified for the smoother scrolling and volume hack).
After flashing the non modified then the modified for this mod (including the smoother scrolling within the framework.jar), it booted up fine, but as I say, it isnt centered... Would you know why? attached is screen shots taken with ddms.bat
Click to expand...
Click to collapse
Although I haven't got this to work for me yet either, after spending some time on this, I would compare the github branch for the rom you are working with with the one he linked to in 4th post and make the edits according to the code boxes in the OP.
The reason it's not centered when you did get it to boot is because the edit in the jar file is what centers it. I tried to both edit the image and center it in the xml file. It worked to a point, but still not good enough.
shane6374 said:
Although I haven't got this to work for me yet either, after spending some time on this, I would compare the github branch for the rom you are working with with the one he linked to in 4th post and make the edits according to the code boxes in the OP.
The reason it's not centered when you did get it to boot is because the edit in the jar file is what centers it. I tried to both edit the image and center it in the xml file. It worked to a point, but still not good enough.
Click to expand...
Click to collapse
Thanks, i will check the two sources and let the thread know the outcome... never actually compiled and dont really have the environment for it...
Sent from my Transformer TF101 using XDA Premium HD app
Two sources are different... may have to look a building the framework.jar from source...
Just a quick question for anyone who is reading...
Would you sign framework.jar (or any system/app) after Modding them? And if so, with what key? The testsign and key which is in with apk manager (that I think was originally from sterricson(I think that is the guy on xda forums))?
Sent from my HTC Desire using xda premium
honeycomb style v2
preview :
i think this is much more similar to honeycomb than previous one..
and of course, far more complex (or annoying? ) to make...
anyway, i'll add this to op later..
mattmanwrx said:
Would you sign framework.jar (or any system/app) after Modding them?
Click to expand...
Click to collapse
you don't have to sign modified framework.jar.
evilisto said:
you don't have to sign modified framework.jar.
Click to expand...
Click to collapse
Thanks, my multiwaveview.smali is not any of the ones you have, and if i use yours its gives me a mismatch signiture for classes.dex @framework...
My multiwaveview is edited (evervolv based rom) and the phone wont boot...
I will need to learn how to compile from source (have edited it in github), so i can use it myself...
Sent from my Transformer TF101 using XDA Premium HD app
could u make a flashable zip for the chrome lover pleeeeeeeeeez?
can someone help me
I've been trying all night to decompile and recompile framework-res.apk but I have been unsuccessful
I always get an error when I recompile
I have a Galaxy Nexus and i'm running AOKP M4
stupid question bcuz it says i can in the OP.. can i use this on my stock ota 4.0.2/icl53f ??
evilisto said:
preview :
i think this is much more similar to honeycomb than previous one..
and of course, far more complex (or annoying? ) to make...
anyway, i'll add this to op later..
you don't have to sign modified framework.jar.
Click to expand...
Click to collapse
It sounds great and hoping it will appear on AOKP
h_zee13 said:
can someone help me
I've been trying all night to decompile and recompile framework-res.apk but I have been unsuccessful
I always get an error when I recompile
I have a Galaxy Nexus and i'm running AOKP M4
Click to expand...
Click to collapse
Can u tell us what your error is? It may help
Sent from my HTC Desire using xda premium
is there a way to force wakeup to go to this screen instead of my password unlock? got exchange mail and i need to have either pw or pin.
thanks!

Json body with retrofit issues with format

As simple as this json looks I cannot get it formatted correctly to post in body.
Code:
{
"requests": [
{
"action": "reject",
"justification": "admin reason",
"requestId": "23423423refsdsdgdg"
}
],
"justification": "admin reason"
}
Here is what I have so far in Android studio using retrofit2
Code:
Gson gson = new GsonBuilder()
.setLenient()
.create();
Retrofit.Builder builder = new Retrofit.Builder()
.baseUrl("https://myurl.com/")
.addConverterFactory(GsonConverterFactory.create(gson));
JsonObject jsonObject = new JsonObject();
JsonObject jsonObjectN = new JsonObject();
jsonObject.addProperty("action", action);
jsonObject.addProperty("request_id", request_id);
jsonObject.addProperty("justification", "blablabla");
jsonObjectN.add("requests", jsonObject);
jsonObjectN.addProperty("justification", justification);
Retrofit retrofit = builder.build();
Client client = retrofit.create(Client.class);
Call<PostRequest> user = client.postRequests(
jsonObjectN
);
in client class I have
Code:
@Headers("Content-Type: application/json")
@POST("/requests")
Call<PostRequest> postRequests(@Body JsonObject body
);
So the request is like this
Code:
Request{method=POST, url=https://myurl.com/requests, tags={class retrofit2.Invocation=com.login.Client.postRequests() [{"requests":{"action":"reject","request_id":"23423423refsdsdgdg","justification":"blablabla"},"justification":"Action done by Admin"}]}}
Very close but I cant quite figure out how to make it in the exact array/json format as its expecting??
Hopefully someone knows Android and jsonObject well enough to help.

Categories

Resources