[Galaxy S III Android Development] wanam:
A new Jelly bean how to was posted here.

This mod was built by Lidroid so all credits goes to him.

​

Lidroid ported his toggles to LF2 Roms, but sadly it depend on his toolbox framework.

I managed to get the needed packages from his framework, i included all toggles source code in SystemUI, to make it easy to port on next updates.

Let start, you need to decompile SystemUI.apk (use my repacked Apk_Manager if you get any issue with ICS files).

Edit "SystemUI.apk\res\layout\tw_status_bar_expanded.xml" and make these changes, this will hide the stock status bar and use the new one:

-- <HorizontalScrollView android:id="@id/quicksetting_scroller" android:scrollbars="none" android:layout_width="wrap_content" android:layout_height="wrap_content"
++ <com.wanam.systemui.quickpanel.PowerWidget android:id="@id/exp_power_stat" android:layout_width="fill_parent" android:layout_height="wrap_content" />
++ <HorizontalScrollView android:id="@id/quicksetting_scroller" android:visibility="gone" android:scrollbars="none" android:layout_width="wrap_content" android:layout_height="wrap_content"

Edit "SystemUI.apk\res\values\ids.xml" and add this Id:

++ <item type="id" name="exp_power_stat">false</item>

Edit "SystemUI.apk\smali\com\android\systemui\statusbar\phone\PhoneStatusBar.smali" and make these changes :

.field mPostCollapseCleanup:Ljava/lang/Runnable;

++ .field mPowerWidget:Lcom/wanam/systemui/quickpanel/PowerWidget;

.field mQueueLock:Ljava/lang/Object;

Method "addIcon" :

invoke-virtual {v1, v0, p3, v2}, Landroid/widget/LinearLayout;->addView(Landroid/view/View;ILandroid/view/ViewGroup$LayoutParams;)V

++ iget-object v1, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mPowerWidget:Lcom/wanam/systemui/quickpanel/PowerWidget;

++ invoke-virtual {v1}, Lcom/wanam/systemui/quickpanel/PowerWidget;->updateWidget()V

return-void

Method "makeStatusBarView"

iput-object v0, v1, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mScrollView:Landroid/widget/ScrollView;

++ const v18, 0x7f0f00d9

++ move/from16 v0, v18

++ invoke-virtual {v6, v0}, Lcom/android/systemui/statusbar/phone/ExpandedView;->findViewById(I)Landroid/view/View;

++ move-result-object v18

++ check-cast v18, Lcom/wanam/systemui/quickpanel/PowerWidget;

++ move-object/from16 v0, v18

++ move-object/from16 v1, p0

++ iput-object v0, v1, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mPowerWidget:Lcom/wanam/systemui/quickpanel/PowerWidget;

sget-boolean v18, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->useTouchWizGUI:Z

iput-boolean v0, v1, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mUseStatusBarMarquee:Z

invoke-direct/range {p0 .. p0}, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->tw_loadNotificationShade()V

++ move-object/from16 v0, p0

++ iget-object v0, v0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mPowerWidget:Lcom/wanam/systemui/quickpanel/PowerWidget;

++ invoke-virtual {v0}, Lcom/wanam/systemui/quickpanel/PowerWidget;->setupWidget()V

return-object v13

Extract attached "wanam.zip" and copy "wanam" folder to your "SystemUI.apk\smali\com".

That's all, recompile your SystemUI.

After building, make sure your Id "exp_power_stat" got the public id "0x7f0f00d9", if you got a different Id, change the public Id in the "makeStatusBarView" method.

Download this file , you need to copy Toggle buttons resources "lidroid-res.apk" to "system/framework", and "QuickPanelSettings.apk" to "/system/app" (with permissions 644) to customize your toggles.

You will need to mod lidroid-res.apk to get rid of "WanamLite Rom" label while trying to reboot, i posted a how to here .