Related
So, I have been looking around in the Framework-res and I see the files needed to have the puzzle lock screen, like on the Fascinate. So, is there a way to use it the I don't know of? If not, could it be ported? Or point me in the right direction to do it myself.
enragedpaza said:
So, I have been looking around in the Framework-res and I see the files needed to have the puzzle lock screen, like on the Fascinate. So, is there a way to use it the I don't know of? If not, could it be ported? Or point me in the right direction to do it myself.
Click to expand...
Click to collapse
Try using the search button. This had been asked since the phone was released.
People have tried porting it and it ends up in a boot loop. Right now we are on a leaked version of froyo so I can bet no one had tried porting the puzzle lock for froyo yet untill we get an official release.
The images have been there since eclair. Just cause the images are there mean we cant use them. Theres a **** load of images that we never see thets in the framework
Sent from my SPH-D700 using Tapatalk
I used search, haha, but thanks for being smart about it.......
Didn't find what you must have seen then, SO SORRY I made one more thread
The ones I mainly found were from the Vibrant, Captivate, and the cross seas version....
They had ports, so I figured I would ask
Check out this thread!
http://forum.xda-developers.com/showthread.php?t=854191
That's interesting.
Sent from my SPH-D700 using Tapatalk
That is why I brought it up..... If people have found out how to do it for other devices, that are froyo, why not some Epic love?
enragedpaza said:
That is why I brought it up..... If people have found out how to do it for other devices, that are froyo, why not some Epic love?
Click to expand...
Click to collapse
I will take a look but I won't spend alot of time knowing we don't got official froyo yet
Sent from my SPH-D700 using Tapatalk
mysteryemotionz said:
I will take a look but I won't spend alot of time knowing we don't got official froyo yet
Sent from my SPH-D700 using Tapatalk
Click to expand...
Click to collapse
I am so limited on time that I can't really look into this. Most of my visits and replies on XDA are from my mobile but it seems that he has included source for this project so that it can be compiled into other roms. I know this would be a big hit for the Epic. I have seen many people asking about the puzzle lock screen. This is nice because you can select from three or four lock screens in your settings!
Sent from my SPH-D700 using XDA App
Thats Easy, No Port needed
Just get an original Fascinate rom. With 7zip find android.policy.jar in the framework folder in the system folder and push it with to one you have in adb
samurai3032 said:
Just get an original Fascinate rom. With 7zip find android.policy.jar in the framework folder in the system folder and push it with to one you have in adb
Click to expand...
Click to collapse
Funny how simple it seems but that will not work! I bet your phone won't even boot. Try it and let me know how it goes!
Sent from my SPH-D700 using XDA App
smoothone said:
Funny how simple it seems but that will not work! I bet your phone won't even boot. Try it and let me know how it goes!
Sent from my SPH-D700 using XDA App
Click to expand...
Click to collapse
You have much to learn young padawan. You can get the services jar for the puzzle lock and port it over which would require changes more just a simple extract and push. On the thread I mentioned there are three lock screens with the ability to change between them in your settings application. This would require you to compile its source into your rom or build it into your rom just as ADW is built into CM6 for example. That way you could go into your settings and actually choose which lock screen you like. It is part of the rom since its source is open and available, hence compiled into CM6. I'm not very good at explaining this so I hope it makes sense :~)
Sent from my SPH-D700 using XDA App
It is ported to the vibrant. So im guessing it can be done to ours aswell. (not saying it would be easy in anyways)
Sent from my SPH-D700 using XDA App
smoothone said:
You have much to learn young padawan. You can get the services jar for the puzzle lock and port it over which would require changes more just a simple extract and push. On the thread I mentioned there are three lock screens with the ability to change between them in your settings application. This would require you to compile its source into your rom or build it into your rom just as ADW is built into CM6 for example. That way you could go into your settings and actually choose which lock screen you like. It is part of the rom since its source is open and available, hence compiled into CM6. I'm not very good at explaining this so I hope it makes sense :~)
Sent from my SPH-D700 using XDA App
Click to expand...
Click to collapse
then why is it that to port the AOSP lock screen all you need to is push the android.policy.jar file in to place without any moding?
http://forum.xda-developers.com/showthread.php?t=862292
samurai3032 said:
then why is it that to port the AOSP lock screen all you need to is push the android.policy.jar file in to place without any moding?
http://forum.xda-developers.com/showthread.php?t=862292
Click to expand...
Click to collapse
Read the whole thread bro.
samurai3032 said:
then why is it that to port the AOSP lock screen all you need to is push the android.policy.jar file in to place without any moding?
http://forum.xda-developers.com/showthread.php?t=862292
Click to expand...
Click to collapse
If you read the entire thread you will see that in order for that AOSP lock screen to work with our rom it had to be compiled. When you port over a mod or app it is not just cut and paste like your saying. You don't always have to recompile certain things you port over, it depends what you are doing but changes still have to be made. This mod has to be ported over and compiled from source. It is not difficult but I don't have the free time right now to do it. I am mostly on this forum by means of my cell. Its hard for me to sit at my computer for a few hours. Just don't have the time. A simple google search on porting in Android will better educate you. Listen if your so adamant about your cut and paste method then try it yourself. Report back but it will not be good news I promise!
Sent from my SPH-D700 using XDA App
Magic Oreo said:
It is ported to the vibrant. So im guessing it can be done to ours aswell. (not saying it would be easy in anyways)
Sent from my SPH-D700 using XDA App
Click to expand...
Click to collapse
Yes it can be ported over. Not extremely difficult if you know what your doing. Anyone with some free time, lol.
Sent from my SPH-D700 using XDA App
samurai3032 said:
then why is it that to port the AOSP lock screen all you need to is push the android.policy.jar file in to place without any moding?
http://forum.xda-developers.com/showthread.php?t=862292
Click to expand...
Click to collapse
Here is some code that was added to the vibrant port to get a two lockscreen port working,
Code:
=====================================================================================================================================
line 26:
=====================================================================================================================================
.field private static final KEY_LOCK_SCREEN:Ljava/lang/String; = "lock_screen"
=====================================================================================================================================
line 62:
=====================================================================================================================================
.field protected mLockPatternUtils:Lcom/android/settings/LockPatternUtils;
.field private mLockScreen:Landroid/preference/ListPreference;
=====================================================================================================================================
line 610:
=====================================================================================================================================
iget-object v11, p0, Lcom/android/settings/SoundAndDisplaySettings;->mLockScreen:Landroid/preference/ListPreference;
iget-object v12, p0, Lcom/android/settings/SoundAndDisplaySettings;->mLockPatternUtils:Lcom/android/settings/LockPatternUtils;
invoke-virtual {v12}, Lcom/android/settings/LockPatternUtils;->getLockConfig()I
move-result v12
invoke-static {v12}, Ljava/lang/String;->valueOf(I)Ljava/lang/String;
move-result-object v12
invoke-virtual {v11, v12}, Landroid/preference/ListPreference;->setValue(Ljava/lang/String;)V
iget-object v11, p0, Lcom/android/settings/SoundAndDisplaySettings;->mLockScreen:Landroid/preference/ListPreference;
invoke-virtual {v11}, Landroid/preference/ListPreference;->getValue()Ljava/lang/String;
move-result-object v11
invoke-direct {p0, v11}, Lcom/android/settings/SoundAndDisplaySettings;->updateUnlockScreenSummary(Ljava/lang/Object;)V
====================================================================================================================================
add this method:
====================================================================================================================================
.method private updateUnlockScreenSummary(Ljava/lang/Object;)V
.locals 6
.parameter "value"
.prologue
.line 343
invoke-virtual {p0}, Lcom/android/settings/SoundAndDisplaySettings;->getResources()Landroid/content/res/Resources;
move-result-object v3
const v4, 0x7f050026
invoke-virtual {v3, v4}, Landroid/content/res/Resources;->getTextArray(I)[Ljava/lang/CharSequence;
move-result-object v1
.line 344
.local v1, summaries:[Ljava/lang/CharSequence;
iget-object v3, p0, Lcom/android/settings/SoundAndDisplaySettings;->mLockScreen:Landroid/preference/ListPreference;
invoke-virtual {v3}, Landroid/preference/ListPreference;->getEntryValues()[Ljava/lang/CharSequence;
move-result-object v2
.line 345
.local v2, values:[Ljava/lang/CharSequence;
const/4 v0, 0x0
.local v0, i:I
:goto_0
array-length v3, v2
if-ge v0, v3, :cond_0
.line 346
const-string v3, "foo"
new-instance v4, Ljava/lang/StringBuilder;
invoke-direct {v4}, Ljava/lang/StringBuilder;->()V
const-string v5, "Comparing entry "
invoke-virtual {v4, v5}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object v4
aget-object v5, v2, v0
invoke-virtual {v4, v5}, Ljava/lang/StringBuilder;->append(Ljava/lang/Object;)Ljava/lang/StringBuilder;
move-result-object v4
const-string v5, " to current "
invoke-virtual {v4, v5}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object v4
iget-object v5, p0, Lcom/android/settings/SoundAndDisplaySettings;->mLockScreen:Landroid/preference/ListPreference;
invoke-virtual {v5}, Landroid/preference/ListPreference;->getValue()Ljava/lang/String;
move-result-object v5
invoke-virtual {v4, v5}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object v4
invoke-virtual {v4}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
move-result-object v4
invoke-static {v3, v4}, Landroid/util/Log;->i(Ljava/lang/String;Ljava/lang/String;)I
.line 347
aget-object v3, v2, v0
invoke-virtual {v3, p1}, Ljava/lang/Object;->equals(Ljava/lang/Object;)Z
move-result v3
if-eqz v3, :cond_1
.line 348
iget-object v3, p0, Lcom/android/settings/SoundAndDisplaySettings;->mLockScreen:Landroid/preference/ListPreference;
aget-object v4, v1, v0
invoke-virtual {v3, v4}, Landroid/preference/ListPreference;->setSummary(Ljava/lang/CharSequence;)V
.line 352
:cond_0
return-void
.line 345
:cond_1
add-int/lit8 v0, v0, 0x1
goto :goto_0
.end method
=========================================================================================================================================
line 1111:
=========================================================================================================================================
new-instance v6, Lcom/android/settings/LockPatternUtils;
invoke-virtual {p0}, Lcom/android/settings/SoundAndDisplaySettings;->getContentResolver()Landroid/content/ContentResolver;
move-result-object v5
invoke-direct {v6, v5}, Lcom/android/settings/LockPatternUtils;->(Landroid/content/ContentResolver;)V
iput-object v6, p0, Lcom/android/settings/SoundAndDisplaySettings;->mLockPatternUtils:Lcom/android/settings/LockPatternUtils;
.line 229
const-string v6, "lock_screen"
invoke-virtual {p0, v6}, Lcom/android/settings/SoundAndDisplaySettings;->findPreference(Ljava/lang/CharSequence;)Landroid/preference/Preference;
move-result-object v6
check-cast v6, Landroid/preference/ListPreference;
iput-object v6, p0, Lcom/android/settings/SoundAndDisplaySettings;->mLockScreen:Landroid/preference/ListPreference;
.line 230
iget-object v6, p0, Lcom/android/settings/SoundAndDisplaySettings;->mLockScreen:Landroid/preference/ListPreference;
invoke-virtual {v6, p0}, Landroid/preference/ListPreference;->setOnPreferenceChangeListener(Landroid/preference/Preference$OnPreferenceChangeListener;)V
==================================================================================================================================================
line 1320:
==================================================================================================================================================
const-string v3, "lock_screen"
invoke-virtual {p1}, Landroid/preference/Preference;->getKey()Ljava/lang/String;
move-result-object v4
invoke-virtual {v3, v4}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
move-result v3
if-eqz v3, :cond_3
move-object v0, p2
check-cast v0, Ljava/lang/String;
move-object v3, v0
invoke-static {v3}, Ljava/lang/Integer;->parseInt(Ljava/lang/String;)I
move-result v2
.restart local v2 #value:I
:try_start_3
iget-object v3, p0, Lcom/android/settings/SoundAndDisplaySettings;->mLockPatternUtils:Lcom/android/settings/LockPatternUtils;
invoke-virtual {v3, v2}, Lcom/android/settings/LockPatternUtils;->setLockConfig(I)V
:goto_2
invoke-direct {p0, p2}, Lcom/android/settings/SoundAndDisplaySettings;->updateUnlockScreenSummary(Ljava/lang/Object;)V
:try_end_3
.catch Ljava/lang/NumberFormatException; {:try_start_3 .. :try_end_3} :catch_1
.end local v2 #value:I
:cond_3
:goto_3
==============================================================================================================================================================
line 1414:
==============================================================================================================================================================
:catch_1
move-exception v3
move-object v1, v3
.line 528
.restart local v1 #e:Ljava/lang/NumberFormatException;
const-string v3, "SoundAndDisplaysSettings"
const-string v3, "could not persist screen unlock setting"
invoke-static {v8, v3, v1}, Landroid/util/Log;->e(Ljava/lang/String;Ljava/lang/String;Ljava/lang/Throwable;)I
goto :goto_3
Just an example of what is involved, well chop chop lets get to work. Were all waiting!
Sent from my SPH-D700 using XDA App
lol i think we will be waiting a long time if hes doing it. his phone prolly wont turn on now cause he wanted to try his cut and paste method.
smoothone said:
Here is some code that was added to the vibrant port to get a two lockscreen port working,
Code:
=====================================================================================================================================
line 26:
=====================================================================================================================================
.field private static final KEY_LOCK_SCREEN:Ljava/lang/String; = "lock_screen"
=====================================================================================================================================
line 62:
=====================================================================================================================================
.field protected mLockPatternUtils:Lcom/android/settings/LockPatternUtils;
.field private mLockScreen:Landroid/preference/ListPreference;
=====================================================================================================================================
line 610:
=====================================================================================================================================
iget-object v11, p0, Lcom/android/settings/SoundAndDisplaySettings;->mLockScreen:Landroid/preference/ListPreference;
iget-object v12, p0, Lcom/android/settings/SoundAndDisplaySettings;->mLockPatternUtils:Lcom/android/settings/LockPatternUtils;
invoke-virtual {v12}, Lcom/android/settings/LockPatternUtils;->getLockConfig()I
move-result v12
invoke-static {v12}, Ljava/lang/String;->valueOf(I)Ljava/lang/String;
move-result-object v12
invoke-virtual {v11, v12}, Landroid/preference/ListPreference;->setValue(Ljava/lang/String;)V
iget-object v11, p0, Lcom/android/settings/SoundAndDisplaySettings;->mLockScreen:Landroid/preference/ListPreference;
invoke-virtual {v11}, Landroid/preference/ListPreference;->getValue()Ljava/lang/String;
move-result-object v11
invoke-direct {p0, v11}, Lcom/android/settings/SoundAndDisplaySettings;->updateUnlockScreenSummary(Ljava/lang/Object;)V
====================================================================================================================================
add this method:
====================================================================================================================================
.method private updateUnlockScreenSummary(Ljava/lang/Object;)V
.locals 6
.parameter "value"
.prologue
.line 343
invoke-virtual {p0}, Lcom/android/settings/SoundAndDisplaySettings;->getResources()Landroid/content/res/Resources;
move-result-object v3
const v4, 0x7f050026
invoke-virtual {v3, v4}, Landroid/content/res/Resources;->getTextArray(I)[Ljava/lang/CharSequence;
move-result-object v1
.line 344
.local v1, summaries:[Ljava/lang/CharSequence;
iget-object v3, p0, Lcom/android/settings/SoundAndDisplaySettings;->mLockScreen:Landroid/preference/ListPreference;
invoke-virtual {v3}, Landroid/preference/ListPreference;->getEntryValues()[Ljava/lang/CharSequence;
move-result-object v2
.line 345
.local v2, values:[Ljava/lang/CharSequence;
const/4 v0, 0x0
.local v0, i:I
:goto_0
array-length v3, v2
if-ge v0, v3, :cond_0
.line 346
const-string v3, "foo"
new-instance v4, Ljava/lang/StringBuilder;
invoke-direct {v4}, Ljava/lang/StringBuilder;->()V
const-string v5, "Comparing entry "
invoke-virtual {v4, v5}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object v4
aget-object v5, v2, v0
invoke-virtual {v4, v5}, Ljava/lang/StringBuilder;->append(Ljava/lang/Object;)Ljava/lang/StringBuilder;
move-result-object v4
const-string v5, " to current "
invoke-virtual {v4, v5}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object v4
iget-object v5, p0, Lcom/android/settings/SoundAndDisplaySettings;->mLockScreen:Landroid/preference/ListPreference;
invoke-virtual {v5}, Landroid/preference/ListPreference;->getValue()Ljava/lang/String;
move-result-object v5
invoke-virtual {v4, v5}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object v4
invoke-virtual {v4}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
move-result-object v4
invoke-static {v3, v4}, Landroid/util/Log;->i(Ljava/lang/String;Ljava/lang/String;)I
.line 347
aget-object v3, v2, v0
invoke-virtual {v3, p1}, Ljava/lang/Object;->equals(Ljava/lang/Object;)Z
move-result v3
if-eqz v3, :cond_1
.line 348
iget-object v3, p0, Lcom/android/settings/SoundAndDisplaySettings;->mLockScreen:Landroid/preference/ListPreference;
aget-object v4, v1, v0
invoke-virtual {v3, v4}, Landroid/preference/ListPreference;->setSummary(Ljava/lang/CharSequence;)V
.line 352
:cond_0
return-void
.line 345
:cond_1
add-int/lit8 v0, v0, 0x1
goto :goto_0
.end method
=========================================================================================================================================
line 1111:
=========================================================================================================================================
new-instance v6, Lcom/android/settings/LockPatternUtils;
invoke-virtual {p0}, Lcom/android/settings/SoundAndDisplaySettings;->getContentResolver()Landroid/content/ContentResolver;
move-result-object v5
invoke-direct {v6, v5}, Lcom/android/settings/LockPatternUtils;->(Landroid/content/ContentResolver;)V
iput-object v6, p0, Lcom/android/settings/SoundAndDisplaySettings;->mLockPatternUtils:Lcom/android/settings/LockPatternUtils;
.line 229
const-string v6, "lock_screen"
invoke-virtual {p0, v6}, Lcom/android/settings/SoundAndDisplaySettings;->findPreference(Ljava/lang/CharSequence;)Landroid/preference/Preference;
move-result-object v6
check-cast v6, Landroid/preference/ListPreference;
iput-object v6, p0, Lcom/android/settings/SoundAndDisplaySettings;->mLockScreen:Landroid/preference/ListPreference;
.line 230
iget-object v6, p0, Lcom/android/settings/SoundAndDisplaySettings;->mLockScreen:Landroid/preference/ListPreference;
invoke-virtual {v6, p0}, Landroid/preference/ListPreference;->setOnPreferenceChangeListener(Landroid/preference/Preference$OnPreferenceChangeListener;)V
==================================================================================================================================================
line 1320:
==================================================================================================================================================
const-string v3, "lock_screen"
invoke-virtual {p1}, Landroid/preference/Preference;->getKey()Ljava/lang/String;
move-result-object v4
invoke-virtual {v3, v4}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
move-result v3
if-eqz v3, :cond_3
move-object v0, p2
check-cast v0, Ljava/lang/String;
move-object v3, v0
invoke-static {v3}, Ljava/lang/Integer;->parseInt(Ljava/lang/String;)I
move-result v2
.restart local v2 #value:I
:try_start_3
iget-object v3, p0, Lcom/android/settings/SoundAndDisplaySettings;->mLockPatternUtils:Lcom/android/settings/LockPatternUtils;
invoke-virtual {v3, v2}, Lcom/android/settings/LockPatternUtils;->setLockConfig(I)V
:goto_2
invoke-direct {p0, p2}, Lcom/android/settings/SoundAndDisplaySettings;->updateUnlockScreenSummary(Ljava/lang/Object;)V
:try_end_3
.catch Ljava/lang/NumberFormatException; {:try_start_3 .. :try_end_3} :catch_1
.end local v2 #value:I
:cond_3
:goto_3
==============================================================================================================================================================
line 1414:
==============================================================================================================================================================
:catch_1
move-exception v3
move-object v1, v3
.line 528
.restart local v1 #e:Ljava/lang/NumberFormatException;
const-string v3, "SoundAndDisplaysSettings"
const-string v3, "could not persist screen unlock setting"
invoke-static {v8, v3, v1}, Landroid/util/Log;->e(Ljava/lang/String;Ljava/lang/String;Ljava/lang/Throwable;)I
goto :goto_3
Just an example of what is involved, well chop chop lets get to work. Were all waiting!
Sent from my SPH-D700 using XDA App[/QUOTE]
Lol u wrote all of that from your phone, that must be tiring.
Sent from my GT-I9000 using XDA App
Click to expand...
Click to collapse
webstar1 said:
Lol u wrote all of that from your phone, that must be tiring.
Sent from my GT-I9000 using XDA App
Click to expand...
Click to collapse
We DO have copy / paste you know.
And please, people, don't quote large blocks of code, images, or text. Drives me insane.
[DEV] [MOD] [HOW-TO] Enable PRL Write & Remove ##DEBUG# lock code prompt - Note2 MA7
Please give thanks/credit if you use this in your ROM - Donations are also appreciated!
Enable the PRL Write option in the ##DATA# menu (please do not abuse this and write VZW PRLs to end your contract as this will just lead to the permanent removal of this where it can't be added back in)
Decompile HiddenMenu.apk
Modify HiddenMenu/smali/com/android/hiddenmenu/hdata.smali
Code:
[COLOR="Red"] --const-string v2, "SPR"[/COLOR]
[COLOR="Green"] ++const-string v2, "SPX"[/COLOR]
sget-object v3, Lcom/android/hiddenmenu/hdata;->mSalesCode:Ljava/lang/String;
invoke-virtual {v2, v3}, Ljava/lang/String;->equalsIgnoreCase(Ljava/lang/String;)Z
move-result v2
if-nez v2, :cond_3
const-string v2, "MSM7630_SURF"
sget-object v3, Lcom/android/hiddenmenu/hdata;->cpuPreCode:Ljava/lang/String;
invoke-virtual {v2, v3}, Ljava/lang/String;->equalsIgnoreCase(Ljava/lang/String;)Z
move-result v2
if-nez v2, :cond_3
const-string v2, "VMU"
sget-object v3, Lcom/android/hiddenmenu/hdata;->mSalesCode:Ljava/lang/String;
invoke-virtual {v2, v3}, Ljava/lang/String;->equalsIgnoreCase(Ljava/lang/String;)Z
move-result v2
if-nez v2, :cond_3
.line 79
invoke-virtual {p0}, Lcom/android/hiddenmenu/hdata;->getPreferenceManager()Landroid/preference/PreferenceManager;
move-result-object v2
invoke-virtual {v2, p0}, Landroid/preference/PreferenceManager;->createPreferenceScreen(Landroid/content/Context;)Landroid/preference/PreferenceScreen;
move-result-object v2
.line 80
const-string v3, "PRL Write"
NAM Block (not sure if this useful)
Code:
.line 85
:cond_3
[COLOR="Red"] --const-string v2, "SPR"[/COLOR]
[COLOR="Green"] ++const-string v2, "SPX"[/COLOR]
sget-object v3, Lcom/android/hiddenmenu/hdata;->mSalesCode:Ljava/lang/String;
invoke-virtual {v2, v3}, Ljava/lang/String;->equalsIgnoreCase(Ljava/lang/String;)Z
move-result v2
if-nez v2, :cond_4
const-string v2, "MSM7630_SURF"
sget-object v3, Lcom/android/hiddenmenu/hdata;->cpuPreCode:Ljava/lang/String;
invoke-virtual {v2, v3}, Ljava/lang/String;->equalsIgnoreCase(Ljava/lang/String;)Z
move-result v2
if-nez v2, :cond_4
const-string v2, "VMU"
sget-object v3, Lcom/android/hiddenmenu/hdata;->mSalesCode:Ljava/lang/String;
invoke-virtual {v2, v3}, Ljava/lang/String;->equalsIgnoreCase(Ljava/lang/String;)Z
move-result v2
if-nez v2, :cond_4
.line 86
invoke-virtual {p0}, Lcom/android/hiddenmenu/hdata;->getPreferenceManager()Landroid/preference/PreferenceManager;
move-result-object v2
invoke-virtual {v2, p0}, Landroid/preference/PreferenceManager;->createPreferenceScreen(Landroid/content/Context;)Landroid/preference/PreferenceScreen;
move-result-object v2
.line 87
const-string v3, "NAM Block"
Remove the ##DEBUG# lock code prompt (Samsung, you shouldn't lock this in the first place as it does no harm)
Modify HiddenMenu/smali/com/android/hiddenmenu/HiddenmenuBroadcastReceiver.smali
Code:
.line 169
[COLOR="Red"] --const-class v0, Lcom/android/hiddenmenu/DebugMenu_Check;[/COLOR]
[COLOR="Green"] ++const-class v0, Lcom/android/hiddenmenu/DEBUGMENU;[/COLOR]
invoke-virtual {v3, p1, v0}, Landroid/content/Intent;->setClass(Landroid/content/Context;Ljava/lang/Class;)Landroid/content/Intent;
move-result-object v0
[COLOR="Red"] --const-string v1, "keyString"
--invoke-virtual {v0, v1, v5}, Landroid/content/Intent;->putExtra(Ljava/lang/String;Ljava/lang/String;)Landroid/content/Intent;
[/COLOR]
move v0, v2
If you like this MOD and would like to see others please consider a donation via my profile. I encourage other developers to share their work in How-To's as well.
Re: [DEV] [MOD] [HOW-TO] Enable PRL Write & Remove ##DEBUG# lock code prompt - Note2
Thanks Digi!
Sent from my SPH-L900 using Tapatalk 2
Does this post accurately explain how to write the PRL once its enabled for the Note 2? Just wondering if the process is the same or if I need to do something different.
http://forum.xda-developers.com/showthread.php?p=35576100
Sent from my Nexus 7 using Tapatalk HD
kelvinnotcalvin said:
Does this post accurately explain how to write the PRL once its enabled for the Note 2? Just wondering if the process is the same or if I need to do something different.
http://forum.xda-developers.com/showthread.php?p=35576100
Sent from my Nexus 7 using Tapatalk HD
Click to expand...
Click to collapse
Did you try it?
Sent from my little Note2
digiblur said:
Did you try it?
Sent from my little Note2
Click to expand...
Click to collapse
Not yet. I haven't been able to get my grubby hands on my gfs note 2 to try this!
Sent from my HTC6435LVW using Tapatalk 2
This will allow you to hide/display the alarm icon in real time. Useful for users that always have an alarm and don't want the icon constantly in the statusbar.
We're going to be working with the following two files:
SecSettings.apk
SystemUI.apk
KEY
REMOVE what's in BLUE
ADD what's in RED
SecSettings.apk
Navigate to /res/values/strings.xml
Add the following to the end of the file
Code:
<string name="alarm_icon_title">Alarm icon</string>
<string name="alarm_icon_summary">Change alarm in order for it to take effect</string>
Navigate to /xml/display_settings.xml
Add the following line wherever you would like it to show in the menu
Code:
<CheckBoxPreference android:title="@string/alarm_icon_title" android:key="alarm_icon" android:summary="@string/alarm_icon_summary" />
Navigate to /smali/com/android/settings/DisplaySettings.smali
Code:
.field private mAccelerometerSecond:Landroid/preference/CheckBoxPreference;
[COLOR="Red"].field private mAlarmIcon:Landroid/preference/CheckBoxPreference;[/COLOR]
.field private mAnimationHandler:Landroid/os/Handler;
.method private updateState()V
Code:
iget-object v3, p0, Lcom/android/settings/DisplaySettings;->mDisplayBatteryLevel:Landroid/preference/CheckBoxPreference;
invoke-virtual {p0}, Lcom/android/settings/DisplaySettings;->getContentResolver()Landroid/content/ContentResolver;
move-result-object v0
const-string v4, "display_battery_percentage"
invoke-static {v0, v4, v2}, Landroid/provider/Settings$System;->getInt(Landroid/content/ContentResolver;Ljava/lang/String;I)I
move-result v0
if-eqz v0, :cond_4
move v0, v1
:goto_1
invoke-virtual {v3, v0}, Landroid/preference/CheckBoxPreference;->setChecked(Z)V
[COLOR="red"]iget-object v3, p0, Lcom/android/settings/DisplaySettings;->mAlarmIcon:Landroid/preference/CheckBoxPreference;
invoke-virtual {p0}, Lcom/android/settings/DisplaySettings;->getContentResolver()Landroid/content/ContentResolver;
move-result-object v0
const-string v4, "alarm_icon"
invoke-static {v0, v4, v1}, Landroid/provider/Settings$System;->getInt(Landroid/content/ContentResolver;Ljava/lang/String;I)I
move-result v0
if-eqz v0, :cond_alarm
move v0, v1
:goto_alarm
invoke-virtual {v3, v0}, Landroid/preference/CheckBoxPreference;->setChecked(Z)V[/COLOR]
Code:
[COLOR="red"]:cond_alarm
move v0, v2
goto/16 :goto_alarm[/COLOR]
:cond_b
move v0, v2
goto :goto_8
:cond_c
move v1, v2
.line 856
goto :goto_9
.end method
.method public onCreate(Landroid/os/BundleV
Code:
const-string v11, "display_battery_level"
invoke-virtual {p0, v11}, Lcom/android/settings/DisplaySettings;->findPreference(Ljava/lang/CharSequence;)Landroid/preference/Preference;
move-result-object v11
check-cast v11, Landroid/preference/CheckBoxPreference;
iput-object v11, p0, Lcom/android/settings/DisplaySettings;->mDisplayBatteryLevel:Landroid/preference/CheckBoxPreference;
[COLOR="red"]const-string v11, "alarm_icon"
invoke-virtual {p0, v11}, Lcom/android/settings/DisplaySettings;->findPreference(Ljava/lang/CharSequence;)Landroid/preference/Preference;
move-result-object v11
check-cast v11, Landroid/preference/CheckBoxPreference;
iput-object v11, p0, Lcom/android/settings/DisplaySettings;->mAlarmIcon:Landroid/preference/CheckBoxPreference;[/COLOR]
invoke-virtual {p0}, Lcom/android/settings/DisplaySettings;->getActivity()Landroid/app/Activity;
move-result-object v11
invoke-static {v11}, Lcom/android/settings/Utils;->isTablet(Landroid/content/Context;)Z
move-result v11
if-eqz v11, :cond_6
.method public onPreferenceTreeClick(Landroid/preference/PreferenceScreen;Landroid/preference/PreferenceZ
Code:
iget-object v0, p0, Lcom/android/settings/DisplaySettings;->mDisplayBatteryLevel:Landroid/preference/CheckBoxPreference;
invoke-virtual {v0}, Landroid/preference/CheckBoxPreference;->isChecked()Z
move-result v0
.line 920
invoke-virtual {p0}, Lcom/android/settings/DisplaySettings;->getContentResolver()Landroid/content/ContentResolver;
move-result-object v3
const-string v4, "display_battery_percentage"
if-eqz v0, :cond_5
move v2, v1
:cond_5
invoke-static {v3, v4, v2}, Landroid/provider/Settings$System;->putInt(Landroid/content/ContentResolver;Ljava/lang/String;I)Z
goto :goto_2
:cond_6
[COLOR="red"]iget-object v0, p0, Lcom/android/settings/DisplaySettings;->mAlarmIcon:Landroid/preference/CheckBoxPreference;
invoke-virtual {p2, v0}, Ljava/lang/Object;->equals(Ljava/lang/Object;)Z
move-result v0
if-eqz v0, :cond_next
iget-object v0, p0, Lcom/android/settings/DisplaySettings;->mAlarmIcon:Landroid/preference/CheckBoxPreference;
invoke-virtual {v0}, Landroid/preference/CheckBoxPreference;->isChecked()Z
move-result v0
invoke-virtual {p0}, Lcom/android/settings/DisplaySettings;->getContentResolver()Landroid/content/ContentResolver;
move-result-object v3
const-string v4, "alarm_icon"
if-eqz v0, :cond_alarm
move v2, v1
:cond_alarm
invoke-static {v3, v4, v2}, Landroid/provider/Settings$System;->putInt(Landroid/content/ContentResolver;Ljava/lang/String;I)Z
goto/16 :goto_2
:cond_next[/COLOR]
iget-object v0, p0, Lcom/android/settings/DisplaySettings;->mNotificationPulse:Landroid/preference/CheckBoxPreference;
if-ne p2, v0, :cond_10
.line 923
iget-object v0, p0, Lcom/android/settings/DisplaySettings;->mNotificationPulse:Landroid/preference/CheckBoxPreference;
invoke-virtual {v0}, Landroid/preference/CheckBoxPreference;->isChecked()Z
move-result v0
Compile and test!
Now for SystemUI.apk
Navigate to /smali/com/android/systemui/statusbar/phone/PhoneStatusBarPolicy.smali
.method private final updateAlarm(Landroid/content/IntentV
Code:
.method private final updateAlarm(Landroid/content/Intent;)V
[COLOR="Red"].locals 5[/COLOR]
.parameter "intent"
.prologue
.line 194
[COLOR="Red"]const/4 v3, 0x0[/COLOR]
const-string v1, "alarmSet"
const/4 v2, 0x0
invoke-virtual {p1, v1, v2}, Landroid/content/Intent;->getBooleanExtra(Ljava/lang/String;Z)Z
move-result v0
[COLOR="red"]iget-object v1, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBarPolicy;->mContext:Landroid/content/Context;
invoke-virtual {v1}, Landroid/content/Context;->getContentResolver()Landroid/content/ContentResolver;
move-result-object v1
const-string v2, "alarm_icon"
invoke-static {v1, v2, v3}, Landroid/provider/Settings$System;->getInt(Landroid/content/ContentResolver;Ljava/lang/String;I)I
move-result v1
if-nez v1, :cond_0
move v0, v3[/COLOR]
.line 195
.local v0, alarmSet:Z
[COLOR="red"]:cond_0[/COLOR]
iget-object v1, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBarPolicy;->mService:Landroid/app/StatusBarManager;
const-string v2, "alarm_clock"
invoke-virtual {v1, v2, v0}, Landroid/app/StatusBarManager;->setIconVisibility(Ljava/lang/String;Z)V
.line 196
return-void
.end method
That's it. Compile and test!
On a roll I see. Thanks Loserskater
Worked. Thank you
Sent from my SAMSUNG-SGH-I747 using xda premium
Great mod boss, and very useful!!! :good::highfive:
This works perfectly on my Sprint GS3. Thanks for another great tutorial loserskater. By any chance do you have one for the bluetooth icon?
THX works for me with a hot boot, not in real time (I9100)
Perhaps any solutions for this ?
Thx
If you change, add, or delete an alarm this mod should take effect without a reboot.
metalfan78 said:
If you change, add, or delete an alarm this mod should take effect without a reboot.
Click to expand...
Click to collapse
You´re right THX
You're welcome
Tired of the volume panel sitting on the screen for what seems like way too long? You can now change the timeout so it hides much quicker.
We're going to be working with the following two files:
SecSettings.apk
framework.jar
KEY
ADD what's in RED
SecSettings.apk
Navigate to /res/values/arrays.xml
Add the following to the end of the file
Code:
<string-array name="volume_panel_timeout_entries">
<item>0.5s</item>
<item>1s</item>
<item>1.5s</item>
<item>2s</item>
<item>2.5s</item>
<item>3s (Default)</item>
</string-array>
<string-array name="volume_panel_timeout_values">
<item>500</item>
<item>1000</item>
<item>1500</item>
<item>2000</item>
<item>2500</item>
<item>3000</item>
</string-array>
Navigate to /res/values/strings.xml
Add the following to the end of the file
Code:
<string name="volume_panel_timeout_title">Volume Panel Timeout</string>
<string name="volume_panel_timeout_summary">%s</string>
Navigate to /xml/display_settings.xml
Add the following line wherever you would like it to show in the menu
Code:
<ListPreference android:persistent="false" android:entries="@array/volume_panel_timeout_entries" android:title="@string/volume_panel_timeout_title" android:key="volume_panel_timeout" android:summary="@string/volume_panel_timeout_summary" android:widgetLayout="@layout/round_more_icon" android:entryValues="@array/volume_panel_timeout_values" />
Navigate to /smali/com/android/settings/DisplaySettings.smali
Code:
.field mSupportFolderType:Z
.field private mTouchKeyLight:Landroid/preference/ListPreference;
[COLOR="Red"].field mVolumePanel:Landroid/preference/ListPreference;[/COLOR]
.method private updateState()V
Code:
iget-object v3, p0, Lcom/android/settings/DisplaySettings;->mDisplayBatteryLevel:Landroid/preference/CheckBoxPreference;
invoke-virtual {p0}, Lcom/android/settings/DisplaySettings;->getContentResolver()Landroid/content/ContentResolver;
move-result-object v0
const-string v4, "display_battery_percentage"
invoke-static {v0, v4, v2}, Landroid/provider/Settings$System;->getInt(Landroid/content/ContentResolver;Ljava/lang/String;I)I
move-result v0
if-eqz v0, :cond_4
move v0, v1
:goto_1
invoke-virtual {v3, v0}, Landroid/preference/CheckBoxPreference;->setChecked(Z)V
[COLOR="red"]iget-object v0, p0, Lcom/android/settings/DisplaySettings;->mVolumePanel:Landroid/preference/ListPreference;
invoke-virtual {p0}, Lcom/android/settings/DisplaySettings;->getContentResolver()Landroid/content/ContentResolver;
move-result-object v3
const-string v4, "volume_panel_timeout"
const/16 v5, 0x5
invoke-static {v3, v4, v5}, Landroid/provider/Settings$System;->getInt(Landroid/content/ContentResolver;Ljava/lang/String;I)I
move-result v3
invoke-static {v3}, Ljava/lang/String;->valueOf(I)Ljava/lang/String;
move-result-object v3
invoke-virtual {v0, v3}, Landroid/preference/ListPreference;->setValue(Ljava/lang/String;)V
iget-object v0, p0, Lcom/android/settings/DisplaySettings;->mVolumePanel:Landroid/preference/ListPreference;
iget-object v3, p0, Lcom/android/settings/DisplaySettings;->mVolumePanel:Landroid/preference/ListPreference;
invoke-virtual {v3}, Landroid/preference/ListPreference;->getEntry()Ljava/lang/CharSequence;
move-result-object v3
invoke-virtual {v0, v3}, Landroid/preference/ListPreference;->setSummary(Ljava/lang/CharSequence;)V[/COLOR]
iget-object v0, p0, Lcom/android/settings/DisplaySettings;->mTouchKeyLight:Landroid/preference/ListPreference;
invoke-virtual {p0}, Lcom/android/settings/DisplaySettings;->getContentResolver()Landroid/content/ContentResolver;
move-result-object v3
const-string v4, "button_key_light"
.method public onCreate(Landroid/os/BundleV
Code:
const-string v11, "display_battery_level"
invoke-virtual {p0, v11}, Lcom/android/settings/DisplaySettings;->findPreference(Ljava/lang/CharSequence;)Landroid/preference/Preference;
move-result-object v11
check-cast v11, Landroid/preference/CheckBoxPreference;
iput-object v11, p0, Lcom/android/settings/DisplaySettings;->mDisplayBatteryLevel:Landroid/preference/CheckBoxPreference;
[COLOR="red"]const-string v11, "volume_panel_timeout"
invoke-virtual {p0, v11}, Lcom/android/settings/DisplaySettings;->findPreference(Ljava/lang/CharSequence;)Landroid/preference/Preference;
move-result-object v11
check-cast v11, Landroid/preference/ListPreference;
iput-object v11, p0, Lcom/android/settings/DisplaySettings;->mVolumePanel:Landroid/preference/ListPreference;
iget-object v11, p0, Lcom/android/settings/DisplaySettings;->mVolumePanel:Landroid/preference/ListPreference;
invoke-virtual {v11, p0}, Landroid/preference/ListPreference;->setOnPreferenceChangeListener(Landroid/preference/Preference$OnPreferenceChangeListener;)V[/COLOR]
invoke-virtual {p0}, Lcom/android/settings/DisplaySettings;->getActivity()Landroid/app/Activity;
move-result-object v11
invoke-static {v11}, Lcom/android/settings/Utils;->isTablet(Landroid/content/Context;)Z
move-result v11
if-eqz v11, :cond_6
.method public onPreferenceChange(Landroid/preference/Preference;Ljava/lang/ObjectZ
Code:
:catch_2
move-exception v0
.line 1038
const-string v1, "DisplaySettings"
const-string v2, "could not persist Touch key light setting"
invoke-static {v1, v2, v0}, Landroid/util/Log;->secE(Ljava/lang/String;Ljava/lang/String;Ljava/lang/Throwable;)I
goto/16 :goto_4
.line 1040
:cond_9
[COLOR="red"]const-string v2, "volume_panel_timeout"
invoke-virtual {v2, v0}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
move-result v2
if-eqz v2, :cond_next
check-cast p2, Ljava/lang/String;
invoke-static {p2}, Ljava/lang/Integer;->parseInt(Ljava/lang/String;)I
move-result v0
invoke-virtual {p0}, Lcom/android/settings/DisplaySettings;->getContentResolver()Landroid/content/ContentResolver;
move-result-object v1
const-string v2, "volume_panel_timeout"
invoke-static {v1, v2, v0}, Landroid/provider/Settings$System;->putInt(Landroid/content/ContentResolver;Ljava/lang/String;I)Z
iget-object v1, p0, Lcom/android/settings/DisplaySettings;->mVolumePanel:Landroid/preference/ListPreference;
invoke-static {v0}, Ljava/lang/String;->valueOf(I)Ljava/lang/String;
move-result-object v0
invoke-virtual {v1, v0}, Landroid/preference/ListPreference;->setValue(Ljava/lang/String;)V
iget-object v0, p0, Lcom/android/settings/DisplaySettings;->mVolumePanel:Landroid/preference/ListPreference;
iget-object v1, p0, Lcom/android/settings/DisplaySettings;->mVolumePanel:Landroid/preference/ListPreference;
invoke-virtual {v1}, Landroid/preference/ListPreference;->getEntry()Ljava/lang/CharSequence;
move-result-object v1
invoke-virtual {v0, v1}, Landroid/preference/ListPreference;->setSummary(Ljava/lang/CharSequence;)V
goto/16 :goto_4
:cond_next[/COLOR]
const-string v2, "quick_launch"
invoke-virtual {v2, v0}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
move-result v2
That's it for SecSettings. Compile.
framework.jar
Navigate to /smali/android/view/VolumePanel.smali
Find .method private resetTimeout()V
and replace the entire thing with this:
Code:
.method private resetTimeout()V
.locals 5
.prologue
const/4 v4, 0x5
.line 16
iget-object v1, p0, Landroid/view/VolumePanel;->mContext:Landroid/content/Context;
invoke-virtual {v1}, Landroid/content/Context;->getContentResolver()Landroid/content/ContentResolver;
move-result-object v1
.line 17
const-string v2, "volume_panel_timeout"
const/4 v3, 0x0
.line 16
invoke-static {v1, v2, v3}, Landroid/provider/Settings$System;->getInt(Landroid/content/ContentResolver;Ljava/lang/String;I)I
move-result v0
.line 18
.local v0, temp:I
invoke-virtual {p0, v4}, Landroid/view/VolumePanel;->removeMessages(I)V
.line 19
if-eqz v0, :cond_0
.line 20
invoke-virtual {p0, v4}, Landroid/view/VolumePanel;->obtainMessage(I)Landroid/os/Message;
move-result-object v1
int-to-long v2, v0
invoke-virtual {p0, v1, v2, v3}, Landroid/view/VolumePanel;->sendMessageDelayed(Landroid/os/Message;J)Z
.line 24
:goto_0
return-void
.line 22
:cond_0
invoke-virtual {p0, v4}, Landroid/view/VolumePanel;->obtainMessage(I)Landroid/os/Message;
move-result-object v1
const-wide/16 v2, 0xbb8
invoke-virtual {p0, v1, v2, v3}, Landroid/view/VolumePanel;->sendMessageDelayed(Landroid/os/Message;J)Z
goto :goto_0
.end method
Now compile framework.jar (Make sure you compile it correctly adding back the META-INF and preloaded-classes files)
First. (;
Sent from my SGH-I747 using Tapatalk 4
Sajoeee said:
First. (;
Sent from my SGH-I747 using Tapatalk 4
Click to expand...
Click to collapse
First thanks
awesome mod man
Danvdh said:
First thanks
awesome mod man
Click to expand...
Click to collapse
(; ah, man. should have done that. Second thanks. (;
Sent from my SGH-I747 using Tapatalk 4
Nice work....how about some array detail? Looks like you forgot to post up your res/arrays info.
Thanks man.
Didact74 said:
Nice work....how about some array detail? Looks like you forgot to post up your res/arrays info.
Thanks man.
Click to expand...
Click to collapse
Awkward... will do that right now
Sent from my SAMSUNG-SGH-I747
EDIT: Done. Here's what needs to be added:
Navigate to /res/values/arrays.xml
Add the following to the end of the file
Code:
<string-array name="volume_panel_timeout_entries">
<item>0.5s</item>
<item>1s</item>
<item>1.5s</item>
<item>2s</item>
<item>2.5s</item>
<item>3s (Default)</item>
</string-array>
<string-array name="volume_panel_timeout_values">
<item>500</item>
<item>1000</item>
<item>1500</item>
<item>2000</item>
<item>2500</item>
<item>3000</item>
</string-array>
You're a king with this stuff buddy, great work still not really sure what this mod does, is it the timeout for the volume sliders? but definately gonna do it
loserskater said:
Awkward... will do that right now
Sent from my SAMSUNG-SGH-I747
Click to expand...
Click to collapse
Thanks man!
sbreen94 said:
You're a king with this stuff buddy, great work still not really sure what this mod does, is it the timeout for the volume sliders? but definately gonna do it
Click to expand...
Click to collapse
When you press the volume buttons and the slider pops up, this changes how long that is displayed for.
loserskater said:
When you press the volume buttons and the slider pops up, this changes how long that is displayed for.
Click to expand...
Click to collapse
Alright very cool, Lol this is a very general question, but how the heck did you find where that was located in the framework files lol
sbreen94 said:
Alright very cool, Lol this is a very general question, but how the heck did you find where that was located in the framework files lol
Click to expand...
Click to collapse
I decompiled framework and searched for volume. Luckily it was in framework.jar, otherwise I would have just kept decompiling different files until I found it.
Sent from my SAMSUNG-SGH-I747
loserskater said:
I decompiled framework and searched for volume. Luckily it was in framework.jar, otherwise I would have just kept decompiling different files until I found it.
Sent from my SAMSUNG-SGH-I747
Click to expand...
Click to collapse
Ahh so you just have a general idea of what you want to do for a mod and then you search for corresponding files for it.
Mod Works like a charm. Easy to do for the Galaxy S4
Hi! Thanks for this usefull mod Just one small question - is there any way how to set some value as default? After apply this mod and after restart, there wasn't any timeout selected and after volume change volume panel was still visible.
somin.n said:
Hi! Thanks for this usefull mod Just one small question - is there any way how to set some value as default? After apply this mod and after restart, there wasn't any timeout selected and after volume change volume panel was still visible.
Click to expand...
Click to collapse
I just updated this on my rom. I'll edit the OP with the changes.
EDIT: Updated. You'll just have to change the framework.jar
loserskater said:
I just updated this on my rom. I'll edit the OP with the changes.
EDIT: Updated. You'll just have to change the framework.jar
Click to expand...
Click to collapse
Once again thanks for your mods and effort :good:
loserskater said:
Tired of the volume panel sitting on the screen for what seems like way too long? You can now change the timeout so it hides much quicker.
We're going to be working with the following two files:
SecSettings.apk
Click to expand...
Click to collapse
I want volume panel timeout, so i did all other things except in DisplaySettings.smali, actually i cant find those lines in here, so requested to you, i am given here my DisplaySettings.smali, you check please and put those edit in the file and give.
Thanks ☺
Link- https://drive.google.com/file/d/0B-yQqsVcgEKWOXFzc1lxVHh3X2c/view?usp=drivesdk
Power Wake Mod Guide Android 4.3
This completely disables screen wake for both power plugged and unplugged states.
Note: There is a bools entry for the unplugged state but this was written for those devs that want to add toggles for the mods later.
Services.jar edits:
smali\com\android\server\power\PowerManagerService.smali
These edits are in .method private updateIsPoweredLocked(I)V
Red - Remove
Blue - New Code
Remove line in Red:
Code:
const-string v4, "power"
invoke-virtual {v0, v4}, Landroid/content/Context;->getSystemService(Ljava/lang/String;)Ljava/lang/Object;
move-result-object v8
check-cast v8, Landroid/os/PowerManager;
const v0, 0x1000000a
const-string v4, "charger plug"
invoke-virtual {v8, v0, v4}, Landroid/os/PowerManager;->newWakeLock(ILjava/lang/String;)Landroid/os/PowerManager$WakeLock;
move-result-object v7
invoke-virtual {v7, v3}, Landroid/os/PowerManager$WakeLock;->setReferenceCounted(Z)V
const-wide/16 v4, 0x2710
[COLOR="Red"]invoke-virtual {v7, v4, v5}, Landroid/os/PowerManager$WakeLock;->acquire(J)V
[/COLOR]
:cond_1
invoke-static {}, Landroid/os/SystemClock;->uptimeMillis()J
move-result-wide v1
iget v0, p0, Lcom/android/server/power/PowerManagerService;->mAutoPowerOffTimeoutSetting:I
if-lez v0, :cond_2
invoke-direct {p0, v1, v2}, Lcom/android/server/power/PowerManagerService;->resetAutoPowerOffTimerNoUpdateLocked(J)Z
const/4 v0, 0x1
iput-boolean v0, p0, Lcom/android/server/power/PowerManagerService;->mPowerIsChanged:Z
A couple additional edits just a few lines lower.
Code:
:cond_2
invoke-direct {p0, v10, v9, v6}, Lcom/android/server/power/PowerManagerService;->shouldWakeUpWhenPluggedOrUnpluggedLocked(ZIZ)Z
move-result v0
[COLOR="Blue"] goto :goto_td ### No Wake Unplug[/COLOR]
if-eqz v0, :cond_3
new-instance v0, Ljava/lang/StringBuilder;
invoke-direct {v0}, Ljava/lang/StringBuilder;-><init>()V
iget-object v4, p0, Lcom/android/server/power/PowerManagerService;->mScreenOnReason:Ljava/lang/String;
invoke-virtual {v0, v4}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object v0
const-string v4, " powered change"
invoke-virtual {v0, v4}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object v0
invoke-virtual {v0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
move-result-object v0
iput-object v0, p0, Lcom/android/server/power/PowerManagerService;->mScreenOnReason:Ljava/lang/String;
invoke-direct {p0, v1, v2}, Lcom/android/server/power/PowerManagerService;->wakeUpNoUpdateLocked(J)Z
[COLOR="Blue"]:goto_td ### No Wake Unplug[/COLOR]
:cond_3
const/16 v5, 0x3e8