May be the timeout event is your problem..
.field static final LONG_PRESS_POWER_SHUT_OFF:I = 0x2
[B][COLOR="Blue"].field private static final LONG_PRESS_TIMEOUT:I = 0x190[/COLOR][/B]
.field static final MINI_APP_DIALOG_LAYER:I = 0x5
Then change this code method in my tutorial ".method handleVolumeLongPress(I)V", and ".method handleVolumeLongPressAbort()V" to:Here you can set the timeout for long press event of volume rocker, here it is set to 400 millisecond (0x190).
[B][COLOR="Blue"].method handleVolumeLongPress(I)V
.registers 6
const/4 v1, 0x1
move-object/from16 v0, p0
iput-boolean v1, v0, Lcom/android/internal/policy/impl/PhoneWindowManager;->mIsVolumeBlocking:Z
const/4 v1, 0x0
iput-boolean v1, v0, Lcom/android/internal/policy/impl/PhoneWindowManager;->mIsVolumeAction:Z
const/16 v1, 0x18
if-ne p1, v1, :cond_majdi
iget-object v0, p0, Lcom/android/internal/policy/impl/PhoneWindowManager;->mVolumeUpLongPress:Ljava/lang/Runnable;
:goto_nj
iget-object v1, p0, Lcom/android/internal/policy/impl/PhoneWindowManager;->mHandler:Landroid/os/Handler;
sget v2, Lcom/android/internal/policy/impl/PhoneWindowManager;->LONG_PRESS_TIMEOUT:I
int-to-long v2, v2
invoke-virtual {v1, v0, v2, v3}, Landroid/os/Handler;->postDelayed(Ljava/lang/Runnable;J)Z
return-void
:cond_majdi
iget-object v0, p0, Lcom/android/internal/policy/impl/PhoneWindowManager;->mVolumeDownLongPress:Ljava/lang/Runnable;
goto :goto_nj
.end method
.method handleVolumeLongPressAbort()V
.registers 3
const/4 v1, 0x0
move-object/from16 v0, p0
iput-boolean v1, v0, Lcom/android/internal/policy/impl/PhoneWindowManager;->mIsVolumeBlocking:Z
iget-object v0, p0, Lcom/android/internal/policy/impl/PhoneWindowManager;->mHandler:Landroid/os/Handler;
iget-object v1, p0, Lcom/android/internal/policy/impl/PhoneWindowManager;->mVolumeUpLongPress:Ljava/lang/Runnable;
invoke-virtual {v0, v1}, Landroid/os/Handler;->removeCallbacks(Ljava/lang/Runnable;)V
iget-object v0, p0, Lcom/android/internal/policy/impl/PhoneWindowManager;->mHandler:Landroid/os/Handler;
iget-object v1, p0, Lcom/android/internal/policy/impl/PhoneWindowManager;->mVolumeDownLongPress:Ljava/lang/Runnable;
invoke-virtual {v0, v1}, Landroid/os/Handler;->removeCallbacks(Ljava/lang/Runnable;)V
return-void
.end method[/COLOR][/B]
thanks :d try it nowMay be the timeout event is your problem..
OK try this one:
- Search for this static field ".field static final LONG_PRESS_POWER_SHUT_OFF:I = 0x2" and add this line bellow it (the blue one):
Code:.field static final LONG_PRESS_POWER_SHUT_OFF:I = 0x2 [B][COLOR="Blue"].field private static final LONG_PRESS_TIMEOUT:I = 0x190[/COLOR][/B] .field static final MINI_APP_DIALOG_LAYER:I = 0x5
Then change this code method in my tutorial ".method handleVolumeLongPress(I)V", and ".method handleVolumeLongPressAbort()V" to:
I have tested this new method in my device and it worked great with set timeout delay..Code:[B][COLOR="Blue"].method handleVolumeLongPress(I)V .registers 6 const/4 v1, 0x1 move-object/from16 v0, p0 iput-boolean v1, v0, Lcom/android/internal/policy/impl/PhoneWindowManager;->mIsVolumeBlocking:Z const/4 v1, 0x0 iput-boolean v1, v0, Lcom/android/internal/policy/impl/PhoneWindowManager;->mIsVolumeAction:Z const/16 v1, 0x18 if-ne p1, v1, :cond_majdi iget-object v0, p0, Lcom/android/internal/policy/impl/PhoneWindowManager;->mVolumeUpLongPress:Ljava/lang/Runnable; :goto_nj iget-object v1, p0, Lcom/android/internal/policy/impl/PhoneWindowManager;->mHandler:Landroid/os/Handler; sget v2, Lcom/android/internal/policy/impl/PhoneWindowManager;->LONG_PRESS_TIMEOUT:I int-to-long v2, v2 invoke-virtual {v1, v0, v2, v3}, Landroid/os/Handler;->postDelayed(Ljava/lang/Runnable;J)Z return-void :cond_majdi iget-object v0, p0, Lcom/android/internal/policy/impl/PhoneWindowManager;->mVolumeDownLongPress:Ljava/lang/Runnable; goto :goto_nj .end method .method handleVolumeLongPressAbort()V .registers 3 const/4 v1, 0x0 move-object/from16 v0, p0 iput-boolean v1, v0, Lcom/android/internal/policy/impl/PhoneWindowManager;->mIsVolumeBlocking:Z iget-object v0, p0, Lcom/android/internal/policy/impl/PhoneWindowManager;->mHandler:Landroid/os/Handler; iget-object v1, p0, Lcom/android/internal/policy/impl/PhoneWindowManager;->mVolumeUpLongPress:Ljava/lang/Runnable; invoke-virtual {v0, v1}, Landroid/os/Handler;->removeCallbacks(Ljava/lang/Runnable;)V iget-object v0, p0, Lcom/android/internal/policy/impl/PhoneWindowManager;->mHandler:Landroid/os/Handler; iget-object v1, p0, Lcom/android/internal/policy/impl/PhoneWindowManager;->mVolumeDownLongPress:Ljava/lang/Runnable; invoke-virtual {v0, v1}, Landroid/os/Handler;->removeCallbacks(Ljava/lang/Runnable;)V return-void .end method[/COLOR][/B]
I will update the post soon
EDIT:
The post is already modified for the new way.. have fun
<bool name="config_isWaterRippleEnabled">[COLOR="Red"]false[/COLOR]</bool>
<bool name="config_isWaterRippleEnabled">[COLOR="Blue"]true[/COLOR]</bool>
Not necessarily for JB or ICS,, only for:I am following the guide http://forum.xda-developers.com/showthread.php?t=1573032 for 4way reboot for JB that says:
In file "GlobalActions$99.smali" there is id 0x1110008, you might want to check that this id is same in you roms puplic.xml ( config_sf_slowBlur ). In gingerbread roms this did not change, but not I'm not sure about these ICS roms.
now the value in my public.xml for conf_sf_slowBlur is 0x1110009, I have to change the value in GlobalActions$99.smali?
.method public onTouchEvent(Landroid/view/MotionEvent;)Z
.registers 28
[COLOR="Blue"].param p1, "event" # Landroid/view/MotionEvent;[/COLOR]
.prologue
.line 207
move-object/from16 v0, p0
yes,the same error happened when I recompiled the classoutHi majdinj,
are you sure of the line in blue :
Because I can't compile the file with this line.Code:.method public onTouchEvent(Landroid/view/MotionEvent;)Z .registers 28 [COLOR="Blue"].param p1, "event" # Landroid/view/MotionEvent;[/COLOR] .prologue .line 207 move-object/from16 v0, p0
Hi majdinj,
are you sure of the line in blue :
Because I can't compile the file with this line.Code:.method public onTouchEvent(Landroid/view/MotionEvent;)Z .registers 28 [COLOR="Blue"].param p1, "event" # Landroid/view/MotionEvent;[/COLOR] .prologue .line 207 move-object/from16 v0, p0
Have you update baksmali and smali codes,,,yes,the same error happened when I recompiled the classout
Will test it asap, thanks for your answer, you're right I'm using this smali/backsmali code since april so it might be out of date ^^.Have you update baksmali and smali codes,,,
The problem arise only with old codes..
I am using baksmali / smali manager v1.5 with the latest baksmali and smali codes (15/6/2013) and worked flawlessly ( just re-tested one minute ago!!)
Update the codes and try again, I will be waiting to help ya
Will test it asap, thanks for your answer, you're right I'm using this smali/backsmali code since april so it might be out of date ^^.
Thanks for this mod.
But i have an Error when i Compile the framework.jar
OK. My mistake..... Works fine with the Baksmali toolCode:D:\APK>java -jar apktool.jar b framework.jar.out I: Checking whether sources has changed... I: Smaling... [1264,4] Error for input '.param': Invalid directive [1264,11] mismatched input 'p1' expecting END_METHOD_DIRECTIVE Exception in thread "main" brut.androlib.AndrolibException: Could not smali file : D:\APK\framework.jar.out\smali\android\view\ScaleGestureDetector.smali at brut.androlib.src.DexFileBuilder.addSmaliFile(DexFileBuilder.java:45)![]()
believe me I am just a noob that has some interest in modding,,, Java programming!! come on!!! I don't think that I am going to even touch that level even in far future :silly:..!!Hey maj.
Do you have any java programming knowledge?
You're too modest ^^.believe me I am just a noob that has some interest in modding,,, Java programming!! come on!!! I don't think that I am going to even touch that level even in far future :silly:..!!
yes,update baksmali to the lastest version,success!Thank majdini,you are a great man,five stars vote up for you!This is also the same complain in my other thread of this mod,,, but solved when use baksmali tool that has the latest codes
+1yes,update baksmali to the lastest version,success!Thank majdini,you are a great man,five stars vote up for you!
Post a screen showing what part of settings your trying to change.What do I need to do to modify secSettings.apk to have S4 like white settings color. Please let me know.
hi @majdinj in the quote above I could you explain a little better than see what value access$xx in GlobalActions.smali because I'm trying to port it to a galaxy s rom advance pleaseIf you are porting to other device, please make sure in GlobalActions$99.smali whether Landroid/content/context has the same access$xx as same in GlobalActions.smali or change it to be like the one in GlobalActions.smali
Also make sure the following ids in GlobalActions$99.smali are pointed to the correct ids in framework-res.apk:
0x104000a = 0x0104000a = "string" name="ok"
0x104 = 0x01040000 = "string" name="cancel"