[Guide] Add Switch On/Off For Battery, Data Disconnection and Keyboard Notifications

Search This thread

majdinj

Senior Member
Nov 25, 2006
980
3,438
AlAhsa
Ok, it seems that I am on toggles now :D

After this guide, you will be able to switch on or off the full battery notification after the device is being fully charged..

rbl8.png

So here we go..

We will be working with two files, SystemUI.apk and SecSettings.apk

Setting The Toggle Switch >>>
1) SecSettings.apk

- Decompile SecSettings.apk
- Go to res\values folder and open strings.xml and add these new lines:
Code:
	<string name="set_remove_bat">Full Battery Notification</string>
	<string name="notif_on">Notification is Enabled</string>
	<string name="notif_off">Notification is Disabled</string>
- Go to res\xml folder and open display_settings.xml and add these codes where you want to display the toggle check box:
Code:
	<CheckBoxPreference android:title="@string/set_remove_bat" android:key="bat_sbar" android:summaryOn="@string/notif_on" android:summaryOff="@string/notif_off" />
- Now for the smali.. Go to classout\com\android\settings folder and open DisplaySettings.smali.
- Add this line to [# instance fields] section:
Code:
.field private mBatPref:Landroid/preference/CheckBoxPreference;
- On the method ".method public onCreate(Landroid/os/Bundle;)V", search for ""key_multi_window"" and add these lines:
Code:
    .line 570
    const-string v11, "key_multi_window"

    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;->mMultiWindowPref:Landroid/preference/CheckBoxPreference;

    [B][COLOR="Blue"]const-string v11, "bat_sbar"

    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;->mBatPref:Landroid/preference/CheckBoxPreference;[/COLOR][/B]
- Now in the method ".method public onPreferenceTreeClick(Landroid/preference/PreferenceScreen;Landroid/preference/Preference;)Z", search for ""multi_window_enabled"" to locate this part at the end:
Code:
    :cond_15c
    iget-object v0, p0, Lcom/android/settings/DisplaySettings;->mMultiWindowPref:Landroid/preference/CheckBoxPreference;

    invoke-virtual {p2, v0}, Ljava/lang/Object;->equals(Ljava/lang/Object;)Z

    move-result v0

    if-eqz v0, [B][COLOR="Red"]:cond_179[/COLOR][/B]

    .line 1022
    iget-object v0, p0, Lcom/android/settings/DisplaySettings;->mMultiWindowPref:Landroid/preference/CheckBoxPreference;

    invoke-virtual {v0}, Landroid/preference/CheckBoxPreference;->isChecked()Z

    move-result v0

    .line 1023
    invoke-virtual {p0}, Lcom/android/settings/DisplaySettings;->getContentResolver()Landroid/content/ContentResolver;

    move-result-object v3

    const-string v4, "multi_window_enabled"

    if-eqz v0, :cond_177

    :goto_172
    invoke-static {v3, v4, v1}, Landroid/provider/Settings$System;->putInt(Landroid/content/ContentResolver;Ljava/lang/String;I)Z

    goto/16 [B][COLOR="Lime"]:goto_1c[/COLOR][/B]

    :cond_177
    move v1, v2

    goto :goto_172
.end method
Add new codes before [.end method] in the previous section. Pay attention to the red color condition and the green color condition..!!!, so that section will be like this:
Code:
    :cond_15c
    iget-object v0, p0, Lcom/android/settings/DisplaySettings;->mMultiWindowPref:Landroid/preference/CheckBoxPreference;

    invoke-virtual {p2, v0}, Ljava/lang/Object;->equals(Ljava/lang/Object;)Z

    move-result v0

    if-eqz v0, [B][COLOR="Blue"]:cond_batteryToggle[/COLOR][/B]

    .line 1022
    iget-object v0, p0, Lcom/android/settings/DisplaySettings;->mMultiWindowPref:Landroid/preference/CheckBoxPreference;

    invoke-virtual {v0}, Landroid/preference/CheckBoxPreference;->isChecked()Z

    move-result v0

    .line 1023
    invoke-virtual {p0}, Lcom/android/settings/DisplaySettings;->getContentResolver()Landroid/content/ContentResolver;

    move-result-object v3

    const-string v4, "multi_window_enabled"

    if-eqz v0, :cond_177

    :goto_172
    invoke-static {v3, v4, v1}, Landroid/provider/Settings$System;->putInt(Landroid/content/ContentResolver;Ljava/lang/String;I)Z

    goto/16 [B][COLOR="Lime"]:goto_1c[/COLOR][/B]

    :cond_177
    move v1, v2

    goto :goto_172

    [B][COLOR="Blue"]:cond_batteryToggle
    iget-object v0, p0, Lcom/android/settings/DisplaySettings;->mBatPref:Landroid/preference/CheckBoxPreference;

    invoke-virtual {p2, v0}, Ljava/lang/Object;->equals(Ljava/lang/Object;)Z

    move-result v0

    if-eqz v0, [COLOR="Red"]:cond_179[/COLOR]

    .line 1022
    iget-object v0, p0, Lcom/android/settings/DisplaySettings;->mBatPref:Landroid/preference/CheckBoxPreference;

    invoke-virtual {v0}, Landroid/preference/CheckBoxPreference;->isChecked()Z

    move-result v0

    .line 1023
    invoke-virtual {p0}, Lcom/android/settings/DisplaySettings;->getContentResolver()Landroid/content/ContentResolver;

    move-result-object v3

    const-string v4, "bat_sbar"

    if-eqz v0, :cond_majdiB

    :goto_njB
    invoke-static {v3, v4, v1}, Landroid/provider/Settings$System;->putInt(Landroid/content/ContentResolver;Ljava/lang/String;I)Z

    goto/16 [B][COLOR="Lime"]:goto_1c[/COLOR][/B]

    :cond_majdiB
    move v1, v2

    goto :goto_njB[/COLOR][/B]
.end method
- Now in the method ".method public onResume()V", search for ""multi_window_enabled"" and locate this part, pay attention to the red color condition..!!!:
Code:
    :cond_9d
    sget-boolean v0, Lcom/android/settings/DisplaySettings;->UseMultiWindow:Z

    if-eqz v0, [B][COLOR="Red"]:cond_c1[/COLOR][/B]

    .line 847
    iget-object v0, p0, Lcom/android/settings/DisplaySettings;->mMultiWindowPref:Landroid/preference/CheckBoxPreference;

    invoke-virtual {p0}, Lcom/android/settings/DisplaySettings;->getContentResolver()Landroid/content/ContentResolver;

    move-result-object v3

    const-string v4, "multi_window_enabled"

    invoke-static {v3, v4, v1}, Landroid/provider/Settings$System;->getInt(Landroid/content/ContentResolver;Ljava/lang/String;I)I

    move-result v3

    if-ne v3, v1, :cond_de

    :goto_af
    invoke-virtual {v0, v1}, Landroid/preference/CheckBoxPreference;->setChecked(Z)V

    .line 848
    invoke-virtual {p0}, Lcom/android/settings/DisplaySettings;->getContentResolver()Landroid/content/ContentResolver;

    move-result-object v0

    const-string v1, "multi_window_enabled"

    invoke-static {v1}, Landroid/provider/Settings$System;->getUriFor(Ljava/lang/String;)Landroid/net/Uri;

    move-result-object v1

    iget-object v3, p0, Lcom/android/settings/DisplaySettings;->mMultiWindowModeObserver:Landroid/database/ContentObserver;

    invoke-virtual {v0, v1, v2, v3}, Landroid/content/ContentResolver;->registerContentObserver(Landroid/net/Uri;ZLandroid/database/ContentObserver;)V

    line 850
    :cond_c1
    return-void

    :cond_c2
    move v0, v2
And do these modification:
Code:
    :cond_9d
    sget-boolean v0, Lcom/android/settings/DisplaySettings;->UseMultiWindow:Z

    if-eqz v0, [B][COLOR="Blue"]:cond_newBattery[/COLOR][/B]

    .line 847
    iget-object v0, p0, Lcom/android/settings/DisplaySettings;->mMultiWindowPref:Landroid/preference/CheckBoxPreference;

    invoke-virtual {p0}, Lcom/android/settings/DisplaySettings;->getContentResolver()Landroid/content/ContentResolver;

    move-result-object v3

    const-string v4, "multi_window_enabled"

    invoke-static {v3, v4, v1}, Landroid/provider/Settings$System;->getInt(Landroid/content/ContentResolver;Ljava/lang/String;I)I

    move-result v3

    if-ne v3, v1, :cond_de

    :goto_af
    invoke-virtual {v0, v1}, Landroid/preference/CheckBoxPreference;->setChecked(Z)V

    .line 848
    invoke-virtual {p0}, Lcom/android/settings/DisplaySettings;->getContentResolver()Landroid/content/ContentResolver;

    move-result-object v0

    const-string v1, "multi_window_enabled"

    invoke-static {v1}, Landroid/provider/Settings$System;->getUriFor(Ljava/lang/String;)Landroid/net/Uri;

    move-result-object v1

    iget-object v3, p0, Lcom/android/settings/DisplaySettings;->mMultiWindowModeObserver:Landroid/database/ContentObserver;

    invoke-virtual {v0, v1, v2, v3}, Landroid/content/ContentResolver;->registerContentObserver(Landroid/net/Uri;ZLandroid/database/ContentObserver;)V

    [B][COLOR="Blue"]:cond_newBattery
    iget-object v0, p0, Lcom/android/settings/DisplaySettings;->mBatPref:Landroid/preference/CheckBoxPreference;

    if-eqz v0, [COLOR="Red"]:cond_c1[/COLOR]
	
    .line 3001
    iget-object v0, p0, Lcom/android/settings/DisplaySettings;->mBatPref:Landroid/preference/CheckBoxPreference;

    invoke-virtual {p0}, Lcom/android/settings/DisplaySettings;->getContentResolver()Landroid/content/ContentResolver;

    move-result-object v3

    const-string v4, "bat_sbar"

    const/4 v1, 0x0

    invoke-static {v3, v4, v1}, Landroid/provider/Settings$System;->getInt(Landroid/content/ContentResolver;Ljava/lang/String;I)I

    move-result v3

    if-eqz v3, :cond_noShow

    const/4 v1, 0x1

    goto :goto_yesShow

    :cond_noShow
    const/4 v1, 0x0

    :goto_yesShow
    invoke-virtual {v0, v1}, Landroid/preference/CheckBoxPreference;->setChecked(Z)V[/COLOR][/B]

     line 850
    :cond_c1
    return-void

    :cond_c2
    move v0, v2
- Save all changes and compile and push to phone and prof working then continue to next step.



Setting The Referral Switch >>>
2) SystemUI.apk

- Baksmali SystemUI.apk.
- Go to classes/com/android/systemui/power/ folder and open PowerUI.smali.
- Search for this method ".method notifyFullBatteryNotification()V" and add the blue lines and delete or comment out the red line:
Code:
.method notifyFullBatteryNotification()V
    .registers 12

    .prologue
    const/4 v10, 0x0

    .line 827
    iget-object v7, p0, Lcom/android/systemui/SystemUI;->mContext:Landroid/content/Context;

    const-string v8, "notification"

    invoke-virtual {v7, v8}, Landroid/content/Context;->getSystemService(Ljava/lang/String;)Ljava/lang/Object;

    move-result-object v2

    check-cast v2, Landroid/app/NotificationManager;

    .line 829
    .local v2, "notificationManager":Landroid/app/NotificationManager;
    [B][COLOR="Blue"]move-object v0, p0
	
    iget-object v5, v0, Lcom/android/systemui/power/PowerUI;->mContext:Landroid/content/Context;

    invoke-virtual {v5}, Landroid/content/Context;->getContentResolver()Landroid/content/ContentResolver;

    move-result-object v5

    const-string v6, "bat_sbar"

    const/4 v7, 0x1

    invoke-static {v5, v6, v7}, Landroid/provider/Settings$System;->getInt(Landroid/content/ContentResolver;Ljava/lang/String;I)I

    move-result v5

    if-nez v5, :cond_15	
	
    [COLOR="Red"]#if-nez v2, :cond_15[/COLOR][/COLOR]  [COLOR="Green"]<!--- Put the same condition value in the above new condition[/COLOR][/B]

    .line 830
    const-string v7, "PowerUI"

    const-string v8, "notifyFullBatteryNotification : fail to get NotificationManager reference"

    invoke-static {v7, v8}, Landroid/util/Slog;->e(Ljava/lang/String;Ljava/lang/String;)I

    .line 860
    :goto_14
    return-void

    .line 834
    :cond_15
    iget-object v7, p0, Lcom/android/systemui/SystemUI;->mContext:Landroid/content/Context;
- Save changes and compile and push to phone...


For those who just want to disable full battery notification without having headache of adding toggle switch, please see this thread here,,,

A lot of toggle tutorials could be done easily if you just understand the main principle here.. and for giving more options to users, use TOGGLES,,,

Cheers




 
Last edited:

majdinj

Senior Member
Nov 25, 2006
980
3,438
AlAhsa
More referral switches


<< Here is some switch referral settings for some notifications >>​

j1td.png

★ For keyboard notification ★

- Baksmali services.jar
- Navigate to classout/com/android/server/InputMethodManagerService.smali
- Find ".method public setImeWindowStatus(Landroid/os/IBinder;II)V" and add the blue codes and delete the red line:
Code:
.method public setImeWindowStatus(Landroid/os/IBinder;II)V
    .registers 23
    .param p1, "token"    # Landroid/os/IBinder;
    .param p2, "vis"    # I
    .param p3, "backDisposition"    # I

    .prologue
    .line 1640
    invoke-static {}, Landroid/os/Binder;->getCallingUid()I

    move-result v11

    .line 1641
    .local v11, "uid":I
    invoke-static {}, Landroid/os/Binder;->clearCallingIdentity()J

    move-result-wide v4

    .line 1643
    .local v4, "ident":J
    if-eqz p1, :cond_12

    :try_start_a
    move-object/from16 v0, p0

    iget-object v12, v0, Lcom/android/server/InputMethodManagerService;->mCurToken:Landroid/os/IBinder;

    move-object/from16 v0, p1
	
    [B][COLOR="Blue"].line 2000
    move-object/from16 v0, p0

    iget-object v12, v0, Lcom/android/server/InputMethodManagerService;->mContext:Landroid/content/Context;

    invoke-virtual {v12}, Landroid/content/Context;->getContentResolver()Landroid/content/ContentResolver;

    move-result-object v12

    const-string v13, "ime_sbar"

    const/4 v14, 0x1

    invoke-static {v12, v13, v14}, Landroid/provider/Settings$System;->getInt(Landroid/content/ContentResolver;Ljava/lang/String;I)I

    move-result v12

    if-nez v12, :cond_3a[/COLOR]

   [COLOR="Red"] #if-eq v12, v0, :cond_3a[/COLOR][/B]

    .line 1644
    :cond_12
    const-string v12, "InputMethodManagerService"

    new-instance v13, Ljava/lang/StringBuilder;

    invoke-direct {v13}, Ljava/lang/StringBuilder;-><init>()V

    const-string v14, "Ignoring setImeWindowStatus of uid "


★ For mobile data connection toggle off dialogue ★

- Baksmali SystemUI.apk
- Navigate to classout\com\android\systemui\statusbar\policy\quicksetting\MobileDataQuickSettingButton.smali
- Find ".method private setMobileData(Z)V" and add the blue codes and delete the red line:
Code:
.method private setMobileData(Z)V
    .registers 6
    .param p1, "on"    # Z

    .prologue
    .line 248
    iget-object v1, p0, Lcom/android/systemui/statusbar/policy/quicksetting/MobileDataQuickSettingButton;->mContext:Landroid/content/Context;

    invoke-virtual {v1}, Landroid/content/Context;->getContentResolver()Landroid/content/ContentResolver;

    move-result-object v1

    const-string v2, "quickpanel_mobiledata_checked"

    const/4 v3, 0x0

    invoke-static {v1, v2, v3}, Landroid/provider/Settings$Secure;->getInt(Landroid/content/ContentResolver;Ljava/lang/String;I)I

    move-result v0

    .line 250
    .local v0, "mChecked":I
    const-string v1, "STATUSBAR-MobileDataQuickSettingButton"

    new-instance v2, Ljava/lang/StringBuilder;

    invoke-direct {v2}, Ljava/lang/StringBuilder;-><init>()V

    const-string v3, "Mobile data waring checked : "

    invoke-virtual {v2, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v2

    invoke-virtual {v2, v0}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;

    move-result-object v2

    invoke-virtual {v2}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v2

    invoke-static {v1, v2}, Landroid/util/Slog;->i(Ljava/lang/String;Ljava/lang/String;)I

    .line 252
    [B][COLOR="Blue"]move-object v0, p0
	
    iget-object v1, v0, Lcom/android/systemui/statusbar/policy/quicksetting/MobileDataQuickSettingButton;->mContext:Landroid/content/Context;

    invoke-virtual {v1}, Landroid/content/Context;->getContentResolver()Landroid/content/ContentResolver;

    move-result-object v1

    const-string v2, "quickpanel_mobiledata_dialogue"

    const/4 v3, 0x1

    invoke-static {v1, v2, v3}, Landroid/provider/Settings$System;->getInt(Landroid/content/ContentResolver;Ljava/lang/String;I)I

    move-result v1

    if-eqz v1, :cond_2d[/COLOR][/B]
	
    if-nez p1, :cond_2d

    [B][COLOR="Red"]#if-nez v0, :cond_2d[/COLOR][/B]

    .line 253
    invoke-direct {p0}, Lcom/android/systemui/statusbar/policy/quicksetting/MobileDataQuickSettingButton;->onDisplayMobileDataOffAlert()V

    .line 257
    :goto_2c
    return-void

    .line 255
    :cond_2d
    invoke-direct {p0, p1}, Lcom/android/systemui/statusbar/policy/quicksetting/MobileDataQuickSettingButton;->setMobileDataEnabled(Z)V

    goto :goto_2c
.end method


★ For low battery notification ★

- Baksmali SystemUI.apk.
- Go to classes/com/android/systemui/power/ folder and open PowerUI.smali.
- Search for this method ".method showLowBatteryWarning()V" and add the blue lines:
Code:
.method showLowBatteryWarning()V
    .registers 20

    .prologue
    .line 433
    const-string v16, "PowerUI"

    new-instance v17, Ljava/lang/StringBuilder;

    invoke-direct/range {v17 .. v17}, Ljava/lang/StringBuilder;-><init>()V

    move-object/from16 v0, p0

    iget-object v15, v0, Lcom/android/systemui/power/PowerUI;->mBatteryLevelTextView:Landroid/widget/TextView;

    if-nez v15, :cond_78

    const-string v15, "showing"

    :goto_f
    move-object/from16 v0, v17

    invoke-virtual {v0, v15}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v15

    const-string v17, " low battery warning: level="

    move-object/from16 v0, v17

    invoke-virtual {v15, v0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v15

    move-object/from16 v0, p0
	
    [B][COLOR="Blue"]move-object/from16 v0, p0
	
    iget-object v5, v0, Lcom/android/systemui/power/PowerUI;->mContext:Landroid/content/Context;

    invoke-virtual {v5}, Landroid/content/Context;->getContentResolver()Landroid/content/ContentResolver;

    move-result-object v5

    const-string v6, "bat_low"

    const/4 v7, 0x1

    invoke-static {v5, v6, v7}, Landroid/provider/Settings$System;->getInt(Landroid/content/ContentResolver;Ljava/lang/String;I)I

    move-result v5

    if-eqz v5, :goto_77[/COLOR]   [COLOR="Green"]#<!--- goto_77 will return-void (go down & see..!!)[/COLOR][/B]

    iget v0, v0, Lcom/android/systemui/power/PowerUI;->mBatteryLevel:I

    move/from16 v17, v0

    move/from16 v0, v17

    invoke-virtual {v15, v0}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;

    move-result-object v15

    const-string v17, " ["

    move-object/from16 v0, v17

    invoke-virtual {v15, v0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v15

    move-object/from16 v0, p0

    iget v0, v0, Lcom/android/systemui/power/PowerUI;->mBatteryLevel:I

    move/from16 v17, v0

    move-object/from16 v0, p0

    move/from16 v1, v17

    invoke-direct {v0, v1}, Lcom/android/systemui/power/PowerUI;->findBatteryLevelBucket(I)I

    move-result v17

    move/from16 v0, v17

    invoke-virtual {v15, v0}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;

    move-result-object v15

    const-string v17, "]"

    move-object/from16 v0, v17

    invoke-virtual {v15, v0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v15

    invoke-virtual {v15}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v15

    move-object/from16 v0, v16

    invoke-static {v0, v15}, Landroid/util/Slog;->i(Ljava/lang/String;Ljava/lang/String;)I
    ...
    ...
    ...
    .line 539
    [B][COLOR="Red"]:goto_77[/COLOR]   [COLOR="Green"]<!--- You should put this defined goto value in the new if-eqz[/COLOR][/B]
    return-void

You will need to add the switch toggle in SecSettings.apk using the same principle in post #1

 
Last edited:

tkari4

Senior Member
Jan 24, 2010
2,231
6,982
:good:
@kmokhtar79
I'll try them all, so some android.policy.jar can be removed from my Aroma Installer. :D
@majdinj
How long do you keep your note?

I ask only because of your Pimp my Phone project. ;)

I'm staying for now on Note 1.
- there is no big difference between Note 1 and Note 2 (I mean general use)
- Note 3 isn't good as Phone (it's too big for me as phone, or my fingers are too short) :D

It's just your opinion.
 
  • Like
Reactions: Kamy and majdinj

majdinj

Senior Member
Nov 25, 2006
980
3,438
AlAhsa
CRT-OFF Animation Toggle
Here: http://forum.xda-developers.com/showthread.php?t=2194003
Working on Note.
Excellent,, it has the same principle to add toggle switch in SecSettings.apk.
So it is almost the same for all.. what is left to tackle is only switch referral codes (where to incorporate key code in other jar or apk other than SecSettings.apk) which needs several testings..


@majdinj
How long do you keep your note?

I ask only because of your Pimp my Phone project. ;)

I'm staying for now on Note 1.
- there is no big difference between Note 1 and Note 2 (I mean general use)
- Note 3 isn't good as Phone (it's too big for me as phone, or my fingers are too short) :D

It's just your opinion.

Unless I hard brick it of whatever the reason, I will stay with Note 1 :cool:
Although having a new phone is not bad idea :p
 

Kamy

Senior Member
Aug 29, 2012
5,335
19,304
Beijing
Guys! just to let you know that on LSA firmware, mentioned toggle switches in SystemUI are already enabled by default, the only thing I had to do was link them with their referral switches to Settings.
Thanks btw for this tutorial
 
Last edited:
  • Like
Reactions: nokiamodeln91

syaeful

Senior Member
Jul 31, 2013
130
87
Purbalingga
Nice guide... work for me for full battery notification
Just little question
for add switch on/off
there are

Code:
.field private [COLOR="Red"]mBatPref[/COLOR]:Landroid/preference/CheckBoxPreference;

and this
Code:
const-string v11,[COLOR="Red"] "bat_sbar"[/COLOR]

    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;->mBatPref:Landroid/preference/CheckBoxPreference;

and this
Code:
:cond_[COLOR="Red"]batteryToggle[/COLOR]
    iget-object v0, p0, Lcom/android/settings/DisplaySettings;->mBatPref:Landroid/preference/CheckBoxPreference;

    invoke-virtual {p2, v0}, Ljava/lang/Object;->equals(Ljava/lang/Object;)Z

    move-result v0

    if-eqz v0, :cond_179

My question, to which is marked in red, I have to refer to where to make it?
because I am trying to make a toggle for mobile data and does not affect anything when i checked in setting.
thanks.

Sorry My Bad English :)
 

JT1510365

Senior Member
Jan 7, 2014
2,846
2,168
25
South Lyon
HTC Thunderbolt

JT1510365

Senior Member
Jan 7, 2014
2,846
2,168
25
South Lyon
HTC Thunderbolt
Nice guide... work for me for full battery notification
Just little question
for add switch on/off
there are

Code:
.field private [COLOR="Red"]mBatPref[/COLOR]:Landroid/preference/CheckBoxPreference;

and this
Code:
const-string v11,[COLOR="Red"] "bat_sbar"[/COLOR]

    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;->mBatPref:Landroid/preference/CheckBoxPreference;

and this
Code:
:cond_[COLOR="Red"]batteryToggle[/COLOR]
    iget-object v0, p0, Lcom/android/settings/DisplaySettings;->mBatPref:Landroid/preference/CheckBoxPreference;

    invoke-virtual {p2, v0}, Ljava/lang/Object;->equals(Ljava/lang/Object;)Z

    move-result v0

    if-eqz v0, :cond_179

My question, to which is marked in red, I have to refer to where to make it?
because I am trying to make a toggle for mobile data and does not affect anything when i checked in setting.
thanks.

Could you help me out bro if you could?
 

Top Liked Posts

  • There are no posts matching your filters.
  • 7
    Ok, it seems that I am on toggles now :D

    After this guide, you will be able to switch on or off the full battery notification after the device is being fully charged..

    rbl8.png

    So here we go..

    We will be working with two files, SystemUI.apk and SecSettings.apk

    Setting The Toggle Switch >>>
    1) SecSettings.apk

    - Decompile SecSettings.apk
    - Go to res\values folder and open strings.xml and add these new lines:
    Code:
    	<string name="set_remove_bat">Full Battery Notification</string>
    	<string name="notif_on">Notification is Enabled</string>
    	<string name="notif_off">Notification is Disabled</string>
    - Go to res\xml folder and open display_settings.xml and add these codes where you want to display the toggle check box:
    Code:
    	<CheckBoxPreference android:title="@string/set_remove_bat" android:key="bat_sbar" android:summaryOn="@string/notif_on" android:summaryOff="@string/notif_off" />
    - Now for the smali.. Go to classout\com\android\settings folder and open DisplaySettings.smali.
    - Add this line to [# instance fields] section:
    Code:
    .field private mBatPref:Landroid/preference/CheckBoxPreference;
    - On the method ".method public onCreate(Landroid/os/Bundle;)V", search for ""key_multi_window"" and add these lines:
    Code:
        .line 570
        const-string v11, "key_multi_window"
    
        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;->mMultiWindowPref:Landroid/preference/CheckBoxPreference;
    
        [B][COLOR="Blue"]const-string v11, "bat_sbar"
    
        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;->mBatPref:Landroid/preference/CheckBoxPreference;[/COLOR][/B]
    - Now in the method ".method public onPreferenceTreeClick(Landroid/preference/PreferenceScreen;Landroid/preference/Preference;)Z", search for ""multi_window_enabled"" to locate this part at the end:
    Code:
        :cond_15c
        iget-object v0, p0, Lcom/android/settings/DisplaySettings;->mMultiWindowPref:Landroid/preference/CheckBoxPreference;
    
        invoke-virtual {p2, v0}, Ljava/lang/Object;->equals(Ljava/lang/Object;)Z
    
        move-result v0
    
        if-eqz v0, [B][COLOR="Red"]:cond_179[/COLOR][/B]
    
        .line 1022
        iget-object v0, p0, Lcom/android/settings/DisplaySettings;->mMultiWindowPref:Landroid/preference/CheckBoxPreference;
    
        invoke-virtual {v0}, Landroid/preference/CheckBoxPreference;->isChecked()Z
    
        move-result v0
    
        .line 1023
        invoke-virtual {p0}, Lcom/android/settings/DisplaySettings;->getContentResolver()Landroid/content/ContentResolver;
    
        move-result-object v3
    
        const-string v4, "multi_window_enabled"
    
        if-eqz v0, :cond_177
    
        :goto_172
        invoke-static {v3, v4, v1}, Landroid/provider/Settings$System;->putInt(Landroid/content/ContentResolver;Ljava/lang/String;I)Z
    
        goto/16 [B][COLOR="Lime"]:goto_1c[/COLOR][/B]
    
        :cond_177
        move v1, v2
    
        goto :goto_172
    .end method
    Add new codes before [.end method] in the previous section. Pay attention to the red color condition and the green color condition..!!!, so that section will be like this:
    Code:
        :cond_15c
        iget-object v0, p0, Lcom/android/settings/DisplaySettings;->mMultiWindowPref:Landroid/preference/CheckBoxPreference;
    
        invoke-virtual {p2, v0}, Ljava/lang/Object;->equals(Ljava/lang/Object;)Z
    
        move-result v0
    
        if-eqz v0, [B][COLOR="Blue"]:cond_batteryToggle[/COLOR][/B]
    
        .line 1022
        iget-object v0, p0, Lcom/android/settings/DisplaySettings;->mMultiWindowPref:Landroid/preference/CheckBoxPreference;
    
        invoke-virtual {v0}, Landroid/preference/CheckBoxPreference;->isChecked()Z
    
        move-result v0
    
        .line 1023
        invoke-virtual {p0}, Lcom/android/settings/DisplaySettings;->getContentResolver()Landroid/content/ContentResolver;
    
        move-result-object v3
    
        const-string v4, "multi_window_enabled"
    
        if-eqz v0, :cond_177
    
        :goto_172
        invoke-static {v3, v4, v1}, Landroid/provider/Settings$System;->putInt(Landroid/content/ContentResolver;Ljava/lang/String;I)Z
    
        goto/16 [B][COLOR="Lime"]:goto_1c[/COLOR][/B]
    
        :cond_177
        move v1, v2
    
        goto :goto_172
    
        [B][COLOR="Blue"]:cond_batteryToggle
        iget-object v0, p0, Lcom/android/settings/DisplaySettings;->mBatPref:Landroid/preference/CheckBoxPreference;
    
        invoke-virtual {p2, v0}, Ljava/lang/Object;->equals(Ljava/lang/Object;)Z
    
        move-result v0
    
        if-eqz v0, [COLOR="Red"]:cond_179[/COLOR]
    
        .line 1022
        iget-object v0, p0, Lcom/android/settings/DisplaySettings;->mBatPref:Landroid/preference/CheckBoxPreference;
    
        invoke-virtual {v0}, Landroid/preference/CheckBoxPreference;->isChecked()Z
    
        move-result v0
    
        .line 1023
        invoke-virtual {p0}, Lcom/android/settings/DisplaySettings;->getContentResolver()Landroid/content/ContentResolver;
    
        move-result-object v3
    
        const-string v4, "bat_sbar"
    
        if-eqz v0, :cond_majdiB
    
        :goto_njB
        invoke-static {v3, v4, v1}, Landroid/provider/Settings$System;->putInt(Landroid/content/ContentResolver;Ljava/lang/String;I)Z
    
        goto/16 [B][COLOR="Lime"]:goto_1c[/COLOR][/B]
    
        :cond_majdiB
        move v1, v2
    
        goto :goto_njB[/COLOR][/B]
    .end method
    - Now in the method ".method public onResume()V", search for ""multi_window_enabled"" and locate this part, pay attention to the red color condition..!!!:
    Code:
        :cond_9d
        sget-boolean v0, Lcom/android/settings/DisplaySettings;->UseMultiWindow:Z
    
        if-eqz v0, [B][COLOR="Red"]:cond_c1[/COLOR][/B]
    
        .line 847
        iget-object v0, p0, Lcom/android/settings/DisplaySettings;->mMultiWindowPref:Landroid/preference/CheckBoxPreference;
    
        invoke-virtual {p0}, Lcom/android/settings/DisplaySettings;->getContentResolver()Landroid/content/ContentResolver;
    
        move-result-object v3
    
        const-string v4, "multi_window_enabled"
    
        invoke-static {v3, v4, v1}, Landroid/provider/Settings$System;->getInt(Landroid/content/ContentResolver;Ljava/lang/String;I)I
    
        move-result v3
    
        if-ne v3, v1, :cond_de
    
        :goto_af
        invoke-virtual {v0, v1}, Landroid/preference/CheckBoxPreference;->setChecked(Z)V
    
        .line 848
        invoke-virtual {p0}, Lcom/android/settings/DisplaySettings;->getContentResolver()Landroid/content/ContentResolver;
    
        move-result-object v0
    
        const-string v1, "multi_window_enabled"
    
        invoke-static {v1}, Landroid/provider/Settings$System;->getUriFor(Ljava/lang/String;)Landroid/net/Uri;
    
        move-result-object v1
    
        iget-object v3, p0, Lcom/android/settings/DisplaySettings;->mMultiWindowModeObserver:Landroid/database/ContentObserver;
    
        invoke-virtual {v0, v1, v2, v3}, Landroid/content/ContentResolver;->registerContentObserver(Landroid/net/Uri;ZLandroid/database/ContentObserver;)V
    
        line 850
        :cond_c1
        return-void
    
        :cond_c2
        move v0, v2
    And do these modification:
    Code:
        :cond_9d
        sget-boolean v0, Lcom/android/settings/DisplaySettings;->UseMultiWindow:Z
    
        if-eqz v0, [B][COLOR="Blue"]:cond_newBattery[/COLOR][/B]
    
        .line 847
        iget-object v0, p0, Lcom/android/settings/DisplaySettings;->mMultiWindowPref:Landroid/preference/CheckBoxPreference;
    
        invoke-virtual {p0}, Lcom/android/settings/DisplaySettings;->getContentResolver()Landroid/content/ContentResolver;
    
        move-result-object v3
    
        const-string v4, "multi_window_enabled"
    
        invoke-static {v3, v4, v1}, Landroid/provider/Settings$System;->getInt(Landroid/content/ContentResolver;Ljava/lang/String;I)I
    
        move-result v3
    
        if-ne v3, v1, :cond_de
    
        :goto_af
        invoke-virtual {v0, v1}, Landroid/preference/CheckBoxPreference;->setChecked(Z)V
    
        .line 848
        invoke-virtual {p0}, Lcom/android/settings/DisplaySettings;->getContentResolver()Landroid/content/ContentResolver;
    
        move-result-object v0
    
        const-string v1, "multi_window_enabled"
    
        invoke-static {v1}, Landroid/provider/Settings$System;->getUriFor(Ljava/lang/String;)Landroid/net/Uri;
    
        move-result-object v1
    
        iget-object v3, p0, Lcom/android/settings/DisplaySettings;->mMultiWindowModeObserver:Landroid/database/ContentObserver;
    
        invoke-virtual {v0, v1, v2, v3}, Landroid/content/ContentResolver;->registerContentObserver(Landroid/net/Uri;ZLandroid/database/ContentObserver;)V
    
        [B][COLOR="Blue"]:cond_newBattery
        iget-object v0, p0, Lcom/android/settings/DisplaySettings;->mBatPref:Landroid/preference/CheckBoxPreference;
    
        if-eqz v0, [COLOR="Red"]:cond_c1[/COLOR]
    	
        .line 3001
        iget-object v0, p0, Lcom/android/settings/DisplaySettings;->mBatPref:Landroid/preference/CheckBoxPreference;
    
        invoke-virtual {p0}, Lcom/android/settings/DisplaySettings;->getContentResolver()Landroid/content/ContentResolver;
    
        move-result-object v3
    
        const-string v4, "bat_sbar"
    
        const/4 v1, 0x0
    
        invoke-static {v3, v4, v1}, Landroid/provider/Settings$System;->getInt(Landroid/content/ContentResolver;Ljava/lang/String;I)I
    
        move-result v3
    
        if-eqz v3, :cond_noShow
    
        const/4 v1, 0x1
    
        goto :goto_yesShow
    
        :cond_noShow
        const/4 v1, 0x0
    
        :goto_yesShow
        invoke-virtual {v0, v1}, Landroid/preference/CheckBoxPreference;->setChecked(Z)V[/COLOR][/B]
    
         line 850
        :cond_c1
        return-void
    
        :cond_c2
        move v0, v2
    - Save all changes and compile and push to phone and prof working then continue to next step.



    Setting The Referral Switch >>>
    2) SystemUI.apk

    - Baksmali SystemUI.apk.
    - Go to classes/com/android/systemui/power/ folder and open PowerUI.smali.
    - Search for this method ".method notifyFullBatteryNotification()V" and add the blue lines and delete or comment out the red line:
    Code:
    .method notifyFullBatteryNotification()V
        .registers 12
    
        .prologue
        const/4 v10, 0x0
    
        .line 827
        iget-object v7, p0, Lcom/android/systemui/SystemUI;->mContext:Landroid/content/Context;
    
        const-string v8, "notification"
    
        invoke-virtual {v7, v8}, Landroid/content/Context;->getSystemService(Ljava/lang/String;)Ljava/lang/Object;
    
        move-result-object v2
    
        check-cast v2, Landroid/app/NotificationManager;
    
        .line 829
        .local v2, "notificationManager":Landroid/app/NotificationManager;
        [B][COLOR="Blue"]move-object v0, p0
    	
        iget-object v5, v0, Lcom/android/systemui/power/PowerUI;->mContext:Landroid/content/Context;
    
        invoke-virtual {v5}, Landroid/content/Context;->getContentResolver()Landroid/content/ContentResolver;
    
        move-result-object v5
    
        const-string v6, "bat_sbar"
    
        const/4 v7, 0x1
    
        invoke-static {v5, v6, v7}, Landroid/provider/Settings$System;->getInt(Landroid/content/ContentResolver;Ljava/lang/String;I)I
    
        move-result v5
    
        if-nez v5, :cond_15	
    	
        [COLOR="Red"]#if-nez v2, :cond_15[/COLOR][/COLOR]  [COLOR="Green"]<!--- Put the same condition value in the above new condition[/COLOR][/B]
    
        .line 830
        const-string v7, "PowerUI"
    
        const-string v8, "notifyFullBatteryNotification : fail to get NotificationManager reference"
    
        invoke-static {v7, v8}, Landroid/util/Slog;->e(Ljava/lang/String;Ljava/lang/String;)I
    
        .line 860
        :goto_14
        return-void
    
        .line 834
        :cond_15
        iget-object v7, p0, Lcom/android/systemui/SystemUI;->mContext:Landroid/content/Context;
    - Save changes and compile and push to phone...


    For those who just want to disable full battery notification without having headache of adding toggle switch, please see this thread here,,,

    A lot of toggle tutorials could be done easily if you just understand the main principle here.. and for giving more options to users, use TOGGLES,,,

    Cheers




    3
    More referral switches


    << Here is some switch referral settings for some notifications >>​

    j1td.png

    ★ For keyboard notification ★

    - Baksmali services.jar
    - Navigate to classout/com/android/server/InputMethodManagerService.smali
    - Find ".method public setImeWindowStatus(Landroid/os/IBinder;II)V" and add the blue codes and delete the red line:
    Code:
    .method public setImeWindowStatus(Landroid/os/IBinder;II)V
        .registers 23
        .param p1, "token"    # Landroid/os/IBinder;
        .param p2, "vis"    # I
        .param p3, "backDisposition"    # I
    
        .prologue
        .line 1640
        invoke-static {}, Landroid/os/Binder;->getCallingUid()I
    
        move-result v11
    
        .line 1641
        .local v11, "uid":I
        invoke-static {}, Landroid/os/Binder;->clearCallingIdentity()J
    
        move-result-wide v4
    
        .line 1643
        .local v4, "ident":J
        if-eqz p1, :cond_12
    
        :try_start_a
        move-object/from16 v0, p0
    
        iget-object v12, v0, Lcom/android/server/InputMethodManagerService;->mCurToken:Landroid/os/IBinder;
    
        move-object/from16 v0, p1
    	
        [B][COLOR="Blue"].line 2000
        move-object/from16 v0, p0
    
        iget-object v12, v0, Lcom/android/server/InputMethodManagerService;->mContext:Landroid/content/Context;
    
        invoke-virtual {v12}, Landroid/content/Context;->getContentResolver()Landroid/content/ContentResolver;
    
        move-result-object v12
    
        const-string v13, "ime_sbar"
    
        const/4 v14, 0x1
    
        invoke-static {v12, v13, v14}, Landroid/provider/Settings$System;->getInt(Landroid/content/ContentResolver;Ljava/lang/String;I)I
    
        move-result v12
    
        if-nez v12, :cond_3a[/COLOR]
    
       [COLOR="Red"] #if-eq v12, v0, :cond_3a[/COLOR][/B]
    
        .line 1644
        :cond_12
        const-string v12, "InputMethodManagerService"
    
        new-instance v13, Ljava/lang/StringBuilder;
    
        invoke-direct {v13}, Ljava/lang/StringBuilder;-><init>()V
    
        const-string v14, "Ignoring setImeWindowStatus of uid "


    ★ For mobile data connection toggle off dialogue ★

    - Baksmali SystemUI.apk
    - Navigate to classout\com\android\systemui\statusbar\policy\quicksetting\MobileDataQuickSettingButton.smali
    - Find ".method private setMobileData(Z)V" and add the blue codes and delete the red line:
    Code:
    .method private setMobileData(Z)V
        .registers 6
        .param p1, "on"    # Z
    
        .prologue
        .line 248
        iget-object v1, p0, Lcom/android/systemui/statusbar/policy/quicksetting/MobileDataQuickSettingButton;->mContext:Landroid/content/Context;
    
        invoke-virtual {v1}, Landroid/content/Context;->getContentResolver()Landroid/content/ContentResolver;
    
        move-result-object v1
    
        const-string v2, "quickpanel_mobiledata_checked"
    
        const/4 v3, 0x0
    
        invoke-static {v1, v2, v3}, Landroid/provider/Settings$Secure;->getInt(Landroid/content/ContentResolver;Ljava/lang/String;I)I
    
        move-result v0
    
        .line 250
        .local v0, "mChecked":I
        const-string v1, "STATUSBAR-MobileDataQuickSettingButton"
    
        new-instance v2, Ljava/lang/StringBuilder;
    
        invoke-direct {v2}, Ljava/lang/StringBuilder;-><init>()V
    
        const-string v3, "Mobile data waring checked : "
    
        invoke-virtual {v2, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
    
        move-result-object v2
    
        invoke-virtual {v2, v0}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;
    
        move-result-object v2
    
        invoke-virtual {v2}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
    
        move-result-object v2
    
        invoke-static {v1, v2}, Landroid/util/Slog;->i(Ljava/lang/String;Ljava/lang/String;)I
    
        .line 252
        [B][COLOR="Blue"]move-object v0, p0
    	
        iget-object v1, v0, Lcom/android/systemui/statusbar/policy/quicksetting/MobileDataQuickSettingButton;->mContext:Landroid/content/Context;
    
        invoke-virtual {v1}, Landroid/content/Context;->getContentResolver()Landroid/content/ContentResolver;
    
        move-result-object v1
    
        const-string v2, "quickpanel_mobiledata_dialogue"
    
        const/4 v3, 0x1
    
        invoke-static {v1, v2, v3}, Landroid/provider/Settings$System;->getInt(Landroid/content/ContentResolver;Ljava/lang/String;I)I
    
        move-result v1
    
        if-eqz v1, :cond_2d[/COLOR][/B]
    	
        if-nez p1, :cond_2d
    
        [B][COLOR="Red"]#if-nez v0, :cond_2d[/COLOR][/B]
    
        .line 253
        invoke-direct {p0}, Lcom/android/systemui/statusbar/policy/quicksetting/MobileDataQuickSettingButton;->onDisplayMobileDataOffAlert()V
    
        .line 257
        :goto_2c
        return-void
    
        .line 255
        :cond_2d
        invoke-direct {p0, p1}, Lcom/android/systemui/statusbar/policy/quicksetting/MobileDataQuickSettingButton;->setMobileDataEnabled(Z)V
    
        goto :goto_2c
    .end method


    ★ For low battery notification ★

    - Baksmali SystemUI.apk.
    - Go to classes/com/android/systemui/power/ folder and open PowerUI.smali.
    - Search for this method ".method showLowBatteryWarning()V" and add the blue lines:
    Code:
    .method showLowBatteryWarning()V
        .registers 20
    
        .prologue
        .line 433
        const-string v16, "PowerUI"
    
        new-instance v17, Ljava/lang/StringBuilder;
    
        invoke-direct/range {v17 .. v17}, Ljava/lang/StringBuilder;-><init>()V
    
        move-object/from16 v0, p0
    
        iget-object v15, v0, Lcom/android/systemui/power/PowerUI;->mBatteryLevelTextView:Landroid/widget/TextView;
    
        if-nez v15, :cond_78
    
        const-string v15, "showing"
    
        :goto_f
        move-object/from16 v0, v17
    
        invoke-virtual {v0, v15}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
    
        move-result-object v15
    
        const-string v17, " low battery warning: level="
    
        move-object/from16 v0, v17
    
        invoke-virtual {v15, v0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
    
        move-result-object v15
    
        move-object/from16 v0, p0
    	
        [B][COLOR="Blue"]move-object/from16 v0, p0
    	
        iget-object v5, v0, Lcom/android/systemui/power/PowerUI;->mContext:Landroid/content/Context;
    
        invoke-virtual {v5}, Landroid/content/Context;->getContentResolver()Landroid/content/ContentResolver;
    
        move-result-object v5
    
        const-string v6, "bat_low"
    
        const/4 v7, 0x1
    
        invoke-static {v5, v6, v7}, Landroid/provider/Settings$System;->getInt(Landroid/content/ContentResolver;Ljava/lang/String;I)I
    
        move-result v5
    
        if-eqz v5, :goto_77[/COLOR]   [COLOR="Green"]#<!--- goto_77 will return-void (go down & see..!!)[/COLOR][/B]
    
        iget v0, v0, Lcom/android/systemui/power/PowerUI;->mBatteryLevel:I
    
        move/from16 v17, v0
    
        move/from16 v0, v17
    
        invoke-virtual {v15, v0}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;
    
        move-result-object v15
    
        const-string v17, " ["
    
        move-object/from16 v0, v17
    
        invoke-virtual {v15, v0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
    
        move-result-object v15
    
        move-object/from16 v0, p0
    
        iget v0, v0, Lcom/android/systemui/power/PowerUI;->mBatteryLevel:I
    
        move/from16 v17, v0
    
        move-object/from16 v0, p0
    
        move/from16 v1, v17
    
        invoke-direct {v0, v1}, Lcom/android/systemui/power/PowerUI;->findBatteryLevelBucket(I)I
    
        move-result v17
    
        move/from16 v0, v17
    
        invoke-virtual {v15, v0}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;
    
        move-result-object v15
    
        const-string v17, "]"
    
        move-object/from16 v0, v17
    
        invoke-virtual {v15, v0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
    
        move-result-object v15
    
        invoke-virtual {v15}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
    
        move-result-object v15
    
        move-object/from16 v0, v16
    
        invoke-static {v0, v15}, Landroid/util/Slog;->i(Ljava/lang/String;Ljava/lang/String;)I
        ...
        ...
        ...
        .line 539
        [B][COLOR="Red"]:goto_77[/COLOR]   [COLOR="Green"]<!--- You should put this defined goto value in the new if-eqz[/COLOR][/B]
        return-void

    You will need to add the switch toggle in SecSettings.apk using the same principle in post #1

    3
    CRT-OFF Animation Toggle
    Here: http://forum.xda-developers.com/showthread.php?t=2194003
    Working on Note.
    3
    CRT-OFF Animation Toggle
    Here: http://forum.xda-developers.com/showthread.php?t=2194003
    Working on Note.
    Excellent,, it has the same principle to add toggle switch in SecSettings.apk.
    So it is almost the same for all.. what is left to tackle is only switch referral codes (where to incorporate key code in other jar or apk other than SecSettings.apk) which needs several testings..


    @majdinj
    How long do you keep your note?

    I ask only because of your Pimp my Phone project. ;)

    I'm staying for now on Note 1.
    - there is no big difference between Note 1 and Note 2 (I mean general use)
    - Note 3 isn't good as Phone (it's too big for me as phone, or my fingers are too short) :D

    It's just your opinion.

    Unless I hard brick it of whatever the reason, I will stay with Note 1 :cool:
    Although having a new phone is not bad idea :p
    2
    :good:
    @kmokhtar79
    I'll try them all, so some android.policy.jar can be removed from my Aroma Installer. :D
    @majdinj
    How long do you keep your note?

    I ask only because of your Pimp my Phone project. ;)

    I'm staying for now on Note 1.
    - there is no big difference between Note 1 and Note 2 (I mean general use)
    - Note 3 isn't good as Phone (it's too big for me as phone, or my fingers are too short) :D

    It's just your opinion.
Our Apps
Get our official app!
The best way to access XDA on your phone
Nav Gestures
Add swipe gestures to any Android
One Handed Mode
Eases uses one hand with your phone