[GUIDE][TW][JB] how to change long press destination on lidroid toggles topic

SOCIALIZE IT ⇨


Hi guys,
Today I'm going to share how to change the long press destination of any lidroid toggle, I didn't find any guide on it around so I decided to post it myself.... I'm definitely not the owner of lidroid toggles.....so let's begin




Requirements:
1. Brain
2. Patience
3. Experience
4. A SystemUI.apk with lidroid toggles








How to:
1. Decompile your SystemUI which already has lidroid
2. Go to smali/com/wanam/systemui/quickpanel
3. Now open any quicksetting button smali(open only those which don't have the $ mark, and remember that power button and shutdown are also on those which don't have the long press)
4. Now search this:
handleLongClick
5. Below them you'll gonna see the package and activity or in some smalis only the activities
Example:
1. Both package and activity:
From dormant toggle smali:
const-string v1, "com.android.settings"



const-string v2, "com.android.settings.Settings$DormantmodeSettings Activity"
2. Only with activity from sound toggle smali:
const-string v1, "android.settings.SOUND_SETTINGS"

6. Now for those smalis which has both package and activity if you want your long press destination to any other settings page just edit the activity to anything you want,
To say it easily edit the second one:
const-string v2, "com.android.settings.Settings$DormantmodeSettings Activity"
from

const-string v1, "com.android.settings"



const-string v2, "com.android.settings.Settings$DormantmodeSettings Activity"
For those smalis which only have activity edit the activity just like before
7. After your editing is done as usual recompile, sign, push to system,reboot and enjoy










Credits:
Lidroid

@wanam
All credits goes to them I didn't find any guide on it so that's why i just made it and shared




xda-developers


0 commentaires:

Enregistrer un commentaire