[Galaxy Note GT-N7000 Themes and Apps] majdinj:
More referral switches

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

​

★ 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:

.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:

.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:

.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