[Samsung Epic 4G Touch] majdinj:
Got Airplane in settings Notification Panel menu

Got it,,, YES..

I think we have customizable working Airplane toggle here in Notification Panel settings :laugh:

​

How:

Since all resources of SystemUI.apk for Airplane toggle are already present inside the SystemUI.apk, we will be working on SecSettings.apk and SecSettingsProvider.apk

SecSettings.apk:

- Decompile first.

- Add this image resources in res\drawable-xhdpi folder [notification_panel_airplane.png]

- Go to res\values and add this line to strings.xml

<string name="notification_panel_airplane">Airplane Mode</string>

Make sure that the string id name is the same as image resource name (i.e, notification_panel_airplane = notification_panel_airplane)

- Go to smali\com\android\settings folder and open NotificationPanel.smali file.

- Search for the method ".method public MakeConvertPanelName()V" and add the blue lines (make sure to match all registers v and p according to your smali):

.method public MakeConvertPanelName()V
.registers 4

.prologue
.line 119
iget-object [B][COLOR="Red"]v0, p0[/COLOR][/B], Lcom/android/settings/NotificationPanel;->mConvertPanelItemstring:Ljava/util/HashMap;

const-string [B][COLOR="Red"]v1[/COLOR][/B], "Wifi"

const-string [B][COLOR="Red"]v2[/COLOR][/B], "notification_panel_wifi"

invoke-virtual {[B][COLOR="Red"]v0, v1, v2[/COLOR][/B]}, Ljava/util/HashMap;->put(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;

...
...

.line 137
iget-object [B][COLOR="Red"]v0, p0[/COLOR][/B], Lcom/android/settings/NotificationPanel;->mConvertPanelItemstring:Ljava/util/HashMap;

const-string [B][COLOR="Red"]v1[/COLOR][/B], "Sync"

const-string [B][COLOR="Red"]v2[/COLOR][/B], "notification_panel_sync"

invoke-virtual {[B][COLOR="Red"]v0, v1, v2[/COLOR][/B]}, Ljava/util/HashMap;->put(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;

[B][COLOR="RoyalBlue"] # New patch start

iget-object v0, p0, Lcom/android/settings/NotificationPanel;->mConvertPanelItemstring:Ljava/util/HashMap;

const-string v1, "AirplaneMode"

const-string v2, "notification_panel_airplane"

invoke-virtual {v0, v1, v2}, Ljava/util/HashMap;->put(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;

# End[/COLOR][/B]

.line 138
iget-object v0, p0, Lcom/android/settings/NotificationPanel;->mConvertPanelItemstring:Ljava/util/HashMap;

const-string v1, "Empty"

const-string v2, "notification_panel_empty"

invoke-virtual {v0, v1, v2}, Ljava/util/HashMap;->put(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;

.line 139
iget-object [B][COLOR="Red"]v0, p0[/COLOR][/B], Lcom/android/settings/NotificationPanel;->mConvertPanelItemstring:Ljava/util/HashMap;

const-string [B][COLOR="Red"]v1[/COLOR][/B], "notification_panel_wifi"

const-string [B][COLOR="Red"]v2[/COLOR][/B], "Wifi"

invoke-virtual {[B][COLOR="Red"]v0, v1, v2[/COLOR][/B]}, Ljava/util/HashMap;->put(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;

...
...

.line 157
iget-object [B][COLOR="Red"]v0, p0[/COLOR][/B], Lcom/android/settings/NotificationPanel;->mConvertPanelItemstring:Ljava/util/HashMap;

const-string [B][COLOR="Red"]v1[/COLOR][/B], "notification_panel_sync"

const-string [B][COLOR="Red"]v2[/COLOR][/B], "Sync"

invoke-virtual {[B][COLOR="Red"]v0, v1, v2[/COLOR][/B]}, Ljava/util/HashMap;->put(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;

[B][COLOR="RoyalBlue"] # New patch start

iget-object v0, p0, Lcom/android/settings/NotificationPanel;->mConvertPanelItemstring:Ljava/util/HashMap;

const-string v1, "notification_panel_airplane"

const-string v2, "AirplaneMode"

invoke-virtual {v0, v1, v2}, Ljava/util/HashMap;->put(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;

# End[/COLOR][/B]

.line 158
iget-object v0, p0, Lcom/android/settings/NotificationPanel;->mConvertPanelItemstring:Ljava/util/HashMap;

const-string v1, "notification_panel_empty"

const-string v2, "Empty"

invoke-virtual {v0, v1, v2}, Ljava/util/HashMap;->put(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;

- That's all for SecSettings.apk,, compile and push to phone and fix permissions to 644

SecSettingsProvider.apk:

- Decompile first.

- Go to res\values and open strings.xml and add this new database to this string id (the blue):

<string name="def_candidate_notification_list_q1">DrivingMode;SmartStay;[B][COLOR="RoyalBlue"]AirplaneMode;[/COLOR][/B]</string>

- That's all for SecSettingsProvider.apk,, compile and push to phone and fix permissions to 644

- After booting complete, open titanium backup --> manipulate data --> wipe data for user & system app --> delete the data of settings storage, then reboot for the new database in settings.db to load.

If you don't have titanium backup, then you need to do full data wipe.!!

Thanks to:
[MENTION=1670609]shoman94[/MENTION] and [MENTION=2471504]jeboo[/MENTION] who introduce this mod first.
[MENTION=3065070]Goldieking[/MENTION]: for his idea of using titanium backup instead of full wipe to load the new database.

Cheers,,