I rebuild status bar power button in samsung rom in my national day holiday, now it has 14 buttons now, include all samsung buttons, wifi, data connection, gps, flashlight, sound, auto rotation, bluetooth, brightness, screen timeout, lock screen, sync, reboot and power down. Actually early time I coded some of those function in LidroidToolbox, but not included them in status bar. I actually rebuilt it with java, not just mod of samli.
This code can adapt to samsung i9000/i9100/i897/t959/m110s etc. I will port this in my new rom. The flashflight will display a white and brightest activity when the camera without flashlight, for example i9000/i897/t959/m110s etc.
Next I will explain how to adapt it to samsung 2.3 rom. There are 3 attachments QuickPanelSettings.apk, LidroidSystemUI.apk and lidroid-res.apk.
1. Download LidroidSystemUI.apk and decompile it whit apktool, then you get LidroidSystemUI dir.
2. Decompile SystemUI.apk, copy LidroidSystemUI/smali/* into SystemUI/smali.
3. Modify SystemUI/AndroidManifeset.xml, add this code before </Application>
if your model has flashlight, you can skip this step.
4. Open SystemUI/smali/com/android/systemui/status/StatusBarService.smali. Find(Ctrl + F) QuickSettingsView, locate fellow codes
modify
5. Compile SystemUI with apktool, Sign it if you have modify AndroidManifest.xml. Push it into /system/app/
6. push lidroid-res.apk in /system/framework/, push QuickPanelSettings.apk in /system/app, reboot.
Simplicity, no need to modify layout, id and Strings which is painful. If you know how to do it, you will know how simple it is. Any android/rom developer can download this code and add more buttons.
Enjoy!
This code can adapt to samsung i9000/i9100/i897/t959/m110s etc. I will port this in my new rom. The flashflight will display a white and brightest activity when the camera without flashlight, for example i9000/i897/t959/m110s etc.
Next I will explain how to adapt it to samsung 2.3 rom. There are 3 attachments QuickPanelSettings.apk, LidroidSystemUI.apk and lidroid-res.apk.
1. Download LidroidSystemUI.apk and decompile it whit apktool, then you get LidroidSystemUI dir.
2. Decompile SystemUI.apk, copy LidroidSystemUI/smali/* into SystemUI/smali.
3. Modify SystemUI/AndroidManifeset.xml, add this code before </Application>
Code:
<activity android:name="com.lidroid.systemui.quickpanel.FlashlightActivity"
android:theme="@android:style/Theme.NoTitleBar.Fullscreen"
android:clearTaskOnLaunch="true"
android:configChanges="orientation|keyboardHidden"
android:launchMode="singleTask" />
4. Open SystemUI/smali/com/android/systemui/status/StatusBarService.smali. Find(Ctrl + F) QuickSettingsView, locate fellow codes
Code:
const v7, 0x7f030002
invoke-static {p1, v7, v9}, Landroid/view/View;->inflate(Landroid/content/Context;ILandroid/view/ViewGroup;)Landroid/view/View;
move-result-object v3
check-cast v3, Lcom/android/systemui/statusbar/quickpanel/QuickSettingsView;
.line 379
.local v3, qsv:Lcom/android/systemui/statusbar/quickpanel/QuickSettingsView;
modify
Code:
const v7, 0x3030003
invoke-static {p1, v7, v9}, Landroid/view/View;->inflate(Landroid/content/Context;ILandroid/view/ViewGroup;)Landroid/view/View;
move-result-object v3
check-cast v3, Lcom/lidroid/systemui/quickpanel/PowerWidget;
.line 394
.local v3, qsv:Lcom/lidroid/systemui/quickpanel/PowerWidget;
invoke-virtual {v3}, Lcom/lidroid/systemui/quickpanel/PowerWidget;->setupWidget()V
5. Compile SystemUI with apktool, Sign it if you have modify AndroidManifest.xml. Push it into /system/app/
6. push lidroid-res.apk in /system/framework/, push QuickPanelSettings.apk in /system/app, reboot.
Simplicity, no need to modify layout, id and Strings which is painful. If you know how to do it, you will know how simple it is. Any android/rom developer can download this code and add more buttons.
Enjoy!
Attachments
-
20111005114101.jpg52.1 KB · Views: 73,113
-
20111005114110.jpg53 KB · Views: 57,340
-
20111005114118.jpg52.6 KB · Views: 55,184
-
lidroid-res.apk1,019.4 KB · Views: 20,840
-
SC20111015-145333.jpg18.6 KB · Views: 28,810
-
SC20111015-145344.jpg29 KB · Views: 35,171
-
SC20111015-145358.jpg23.4 KB · Views: 44,573
-
LidroidSystemUI.apk34.2 KB · Views: 18,997
-
QuickPanelSettings.apk54.4 KB · Views: 20,367
Last edited: