[Samsung Galaxy S 5 Unified Development] cstayton:
Disable Bluetooth/Alarm/Volume Notifications in StatusBar​

This MOD disables the ongoing Notifications for Bluetooth, Alarm and Volume

and can easily be modified to remove other ongoing statusbar notifications.

this MOD operates a little different it not only removes the icon but also the notification

as well, thus freeing up the statusbar. I tried several different mods for this and none seemed to work

the way I wanted them to so with a lot of searching and a little luck i found the smali code to disable

them rather than just hide the icons.​

STEP 1:

Pull SystemUI.apk either from your device or from your ROM.zip file

from device: adb pull /system/priv-app/SystemUI.apk

from ROM.zip: extract /system/priv-app/SystemUI.apk

STEP 2:

using available tools decompile the apk (either using apktool or Virtuous Ten Studio) I recomend VTS

Locate smali/com/android/systemui/statusbar/phone/PhoneStatusBarPolicy.smali

make the changes listed below:

For Bluetooth notifications:

Search for .method private final updateBluetooth(Landroid/content/Intent;)V

in that method search for const-string v6, "bluetooth" it should look like this

Add the lines in BLUE

[COLOR="Blue"]goto :goto_aa[/COLOR]
const-string v6, "bluetooth"

invoke-virtual {v4, v6, v2, v5, v1}, Landroid/app/StatusBarManager;->setIcon(Ljava/lang/String;IILjava/lang/String;)V

iget-object v4, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBarPolicy;->mService:Landroid/app/StatusBarManager;

const-string v5, "bluetooth"

iget-boolean v6, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBarPolicy;->mBluetoothEnabled:Z

invoke-virtual {v4, v5, v6}, Landroid/app/StatusBarManager;->setIconVisibility(Ljava/lang/String;Z)V

[COLOR="Blue"]:goto_aa[/COLOR]
:cond_0
return-void"

For Alarm search for .method private final updateAlarm(Landroid/content/Intent;)V

Add the lines in BLUE

.method private final updateAlarm(Landroid/content/Intent;)V
.locals 3

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

iget-object v1, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBarPolicy;->mService:Landroid/app/StatusBarManager;

[COLOR="Blue"]goto :goto_cc[/COLOR]
const-string v2, "alarm_clock"

invoke-virtual {v1, v2, v0}, Landroid/app/StatusBarManager;->setIconVisibility(Ljava/lang/String;Z)V

[COLOR="Blue"]:goto_cc[/COLOR]
return-void
.end method

For volume search for .method private final updateVolume()V

Add the lines in BLUE

[COLOR="Blue"]goto :goto_bb[/COLOR]
const-string v7, "volume"

invoke-virtual {v6, v7, v2, v5, v1}, Landroid/app/StatusBarManager;->setIcon(Ljava/lang/String;IILjava/lang/String;)V

:cond_1
iget-boolean v5, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBarPolicy;->mVolumeVisible:Z

if-eq v4, v5, :cond_2

iget-object v5, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBarPolicy;->mService:Landroid/app/StatusBarManager;

const-string v6, "volume"

invoke-virtual {v5, v6, v4}, Landroid/app/StatusBarManager;->setIconVisibility(Ljava/lang/String;Z)V

iput-boolean v4, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBarPolicy;->mVolumeVisible:Z

[COLOR="Blue"]:goto_bb[/COLOR]
:cond_2
return-void

STEP 3:

Save the smali file, recompile the SystemUI.apk and push to your device to test

adb push SystemUI.apk /system/priv-app/SystemUI.apk

adb shell

cd /system/priv-app

chmod 0644 SystemUI.apk

reboot

This smali fragment contains many other ongoing statusbar notifications that can be disabled using the same methods as above.