[Sony Cross-Device Development Themes and Apps] Gaurav007:
Smali Part

Decompile the newly recompiled SystemUI again

Open SystemUI\smali\com\android\systemui\statusbar\phone\PhoneStatusBar.smali

Find

.field private mQSPanel:Lcom/android/systemui/qs/QSPanel;

Add the Line above that

.field private mPowerToggles:Lcom/serajr/powertoggles/PowerToggles;

Find

.field mDataTrafficController:Lcom/sonymobile/systemui/statusbar/policy/DataTrafficControllerImpl;

Add this Line above that

.field private mCustomDrawerLayout:Lcom/serajr/systemui/navigationdrawer/CustomDrawerLayout;

Find

.method private setNavigationIconHints(I)V

Add these Methods below that

.method private setupCustomDrawerLayout()V
.locals 3

.prologue
.line 57
iget-object v0, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mStatusBarWindow:Lcom/android/systemui/statusbar/phone/StatusBarWindowView;

const v1, 0x7f1001e7 #type="id" name="custom_drawer_layout"

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

move-result-object v0

check-cast v0, Lcom/serajr/systemui/navigationdrawer/CustomDrawerLayout;

iput-object v0, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mCustomDrawerLayout:Lcom/serajr/systemui/navigationdrawer/CustomDrawerLayout;

.line 61
iget-object v0, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mCustomDrawerLayout:Lcom/serajr/systemui/navigationdrawer/CustomDrawerLayout;

iget-object v1, p0, Lcom/android/systemui/SystemUI;->mContext:Landroid/content/Context;

invoke-virtual {v1}, Landroid/content/Context;->getResources()Landroid/content/res/Resources;

move-result-object v1

const v2, 0x7f09006b #type="color" name="custom_drawer_layout_scrin"

invoke-virtual {v1, v2}, Landroid/content/res/Resources;->getColor(I)I

move-result v1

invoke-virtual {v0, v1}, Lcom/serajr/systemui/navigationdrawer/CustomDrawerLayout;->setScrimColor(I)V

.line 65
return-void
.end method

.method private setupPowerToggles()V
.locals 3

.prologue
.line 55
iget-object v0, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mStatusBarWindow:Lcom/android/systemui/statusbar/phone/StatusBarWindowView;

const v1, 0x7f1001e8 #type="id" name="power_toggles"

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

move-result-object v0

check-cast v0, Lcom/serajr/powertoggles/PowerToggles;

iput-object v0, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mPowerToggles:Lcom/serajr/powertoggles/PowerToggles;

.line 56
iget-object v0, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mPowerToggles:Lcom/serajr/powertoggles/PowerToggles;

iget-object v1, p0, Lcom/android/systemui/SystemUI;->mContext:Landroid/content/Context;

invoke-virtual {v1}, Landroid/content/Context;->getResources()Landroid/content/res/Resources;

move-result-object v1

const v2, 0x7f0e01ad #type="dimen" name="power_toggles_grid_width"

invoke-virtual {v1, v2}, Landroid/content/res/Resources;->getDimensionPixelSize(I)I

move-result v1

invoke-virtual {v0, v1}, Lcom/serajr/powertoggles/PowerToggles;->gridWidth(I)V

.line 57
iget-object v0, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mPowerToggles:Lcom/serajr/powertoggles/PowerToggles;

const/4 v1, 0x0

invoke-virtual {v0, v1}, Lcom/serajr/powertoggles/PowerToggles;->buttonShowTitle(Z)V

.line 58
iget-object v0, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mPowerToggles:Lcom/serajr/powertoggles/PowerToggles;

invoke-virtual {v0}, Lcom/serajr/powertoggles/PowerToggles;->setupPowerToggles()V

.line 59
iget-object v0, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mPowerToggles:Lcom/serajr/powertoggles/PowerToggles;

invoke-virtual {v0}, Lcom/serajr/powertoggles/PowerToggles;->updatePowerToggles()V

.line 60
iget-object v0, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mPowerToggles:Lcom/serajr/powertoggles/PowerToggles;

new-instance v1, Lcom/android/systemui/statusbar/phone/PhoneStatusBar$48;

invoke-direct {v1, p0}, Lcom/android/systemui/statusbar/phone/PhoneStatusBar$48;-><init>(Lcom/android/systemui/statusbar/phone/PhoneStatusBar;)V

invoke-virtual {v0, v1}, Lcom/serajr/powertoggles/PowerToggles;->setChangeContentObserverListener(Lcom/serajr/powertoggles/PowerToggles$ChangeObserverCallbackInterface;)V

.line 61
return-void
.end method

Replace Public ID of these

0x7f1001e7 #type="id" name="custom_drawer_layout"
0x7f09006b #type="color" name="custom_drawer_layout_scrin"
0x7f1001e8 #type="id" name="power_toggles"
0x7f0e01ad #type="dimen" name="power_toggles_grid_width"

Find

.method public postAnimateCollapsePanels()V

Add these lines

.line 2048
iget-object v0, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mCustomDrawerLayout:Lcom/serajr/systemui/navigationdrawer/CustomDrawerLayout;

invoke-virtual {v0}, Lcom/serajr/systemui/navigationdrawer/CustomDrawerLayout;->closeDrawers()V

.line 4475
iget-object v0, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mPowerToggles:Lcom/serajr/powertoggles/PowerToggles;

invoke-virtual {v0}, Lcom/serajr/powertoggles/PowerToggles;->fullScroll()V

Like this

.method public postAnimateCollapsePanels()V
.locals 2

.prologue
[COLOR="Red"].line 2048
iget-object v0, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mCustomDrawerLayout:Lcom/serajr/systemui/navigationdrawer/CustomDrawerLayout;

invoke-virtual {v0}, Lcom/serajr/systemui/navigationdrawer/CustomDrawerLayout;->closeDrawers()V

.line 4475
iget-object v0, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mPowerToggles:Lcom/serajr/powertoggles/PowerToggles;

invoke-virtual {v0}, Lcom/serajr/powertoggles/PowerToggles;->fullScroll()V[/COLOR]

Find

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

Add these code Above that

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

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

.line 1245
invoke-virtual/range {p0 .. p0}, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->powerTogglesEnabledCallback()V

.line 1246
invoke-virtual/range {p0 .. p0}, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->powerTogglesPreferencesButtonsTitlesCallback()V

Find

.method public refreshAllStatusBarIcons()V

Add these Methods above that

.method public powerTogglesEnabledCallback()V
.locals 3

.prologue
const/4 v2, 0x1

.line 109
iget-object v0, p0, Lcom/android/systemui/SystemUI;->mContext:Landroid/content/Context;

invoke-virtual {v0}, Landroid/content/Context;->getContentResolver()Landroid/content/ContentResolver;

move-result-object v0

const-string v1, "power_toggles_enabled"

invoke-static {v0, v1, v2}, Landroid/provider/Settings$System;->getInt(Landroid/content/ContentResolver;Ljava/lang/String;I)I

move-result v0

if-ne v0, v2, :cond_0

.line 112
const-string v0, "powerTogglesEnabledCallback"

const-string v1, "habilita"

invoke-static {v0, v1}, Landroid/util/Log;->i(Ljava/lang/String;Ljava/lang/String;)I

.line 113
const/4 v0, 0x1

invoke-virtual {p0, v0}, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->customDrawerLayoutEnabled(Z)V

.line 120
:goto_0
return-void

.line 117
:cond_0
const-string v0, "powerTogglesEnabledCallback"

const-string v1, "desabilita"

invoke-static {v0, v1}, Landroid/util/Log;->i(Ljava/lang/String;Ljava/lang/String;)I

.line 118
const/4 v0, 0x0

invoke-virtual {p0, v0}, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->customDrawerLayoutEnabled(Z)V

goto :goto_0
.end method

.method public powerTogglesPreferencesButtonsTitlesCallback()V
.locals 4

.prologue
.line 134
iget-object v1, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mPowerToggles:Lcom/serajr/powertoggles/PowerToggles;

if-eqz v1, :cond_1

.line 136
const/4 v0, 0x0

.line 138
.local v0, "showTitles":Z
iget-object v1, p0, Lcom/android/systemui/SystemUI;->mContext:Landroid/content/Context;

invoke-virtual {v1}, Landroid/content/Context;->getContentResolver()Landroid/content/ContentResolver;

move-result-object v1

const-string v2, "power_toggles_preferences_buttons_titles"

const/4 v3, 0x0

invoke-static {v1, v2, v3}, Landroid/provider/Settings$System;->getInt(Landroid/content/ContentResolver;Ljava/lang/String;I)I

move-result v1

const/4 v2, 0x1

if-ne v1, v2, :cond_0

.line 140
const/4 v0, 0x1

.line 144
:cond_0
iget-object v1, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mPowerToggles:Lcom/serajr/powertoggles/PowerToggles;

invoke-virtual {v1, v0}, Lcom/serajr/powertoggles/PowerToggles;->buttonShowTitle(Z)V

.line 145
iget-object v1, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mPowerToggles:Lcom/serajr/powertoggles/PowerToggles;

invoke-virtual {v1}, Lcom/serajr/powertoggles/PowerToggles;->setupPowerToggles()V

.line 146
iget-object v1, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mPowerToggles:Lcom/serajr/powertoggles/PowerToggles;

invoke-virtual {v1}, Lcom/serajr/powertoggles/PowerToggles;->updatePowerToggles()V

.line 149
.end local v0 # "showTitles":Z
:cond_1
return-void
.end method

Find

.method public destroy()V

Add this method above that

.method public customDrawerLayoutEnabled(Z)V
.locals 2
.param p1, "enabled" # Z

.prologue
.line 77
const/4 v0, 0x0

.line 79
.local v0, "lockMode":I
if-nez p1, :cond_0

.line 81
const/4 v0, 0x1

.line 85
:cond_0
iget-object v1, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mCustomDrawerLayout:Lcom/serajr/systemui/navigationdrawer/CustomDrawerLayout;

invoke-virtual {v1, v0}, Lcom/serajr/systemui/navigationdrawer/CustomDrawerLayout;->setDrawerLockMode(I)V

.line 87
return-void
.end method

Save it

Open /res/layout/status_bar_expanded.xml or msim_status_bar_expanded(dual sim)

Add these Red Lines

<?xml version="1.0" encoding="utf-8"?>
<com.android.systemui.statusbar.phone.NotificationPanelView android:id="@id/notification_panel" android:background="@android:color/transparent" android:layout_width="fill_parent" android:layout_height="fill_parent"
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:systemui="http://schemas.android.com/apk/res/com.android.systemui">
<include android:layout_gravity="bottom" android:layout_width="fill_parent" android:layout_height="@dimen/carrier_label_height" layout="@layout/subs_label" />
<include android:layout_gravity="bottom" android:layout_width="fill_parent" android:layout_height="@dimen/carrier_label_height" android:layout_marginBottom="@dimen/close_handle_height" layout="@layout/carrier_label" />
<include android:visibility="gone" android:layout_height="wrap_content" layout="@layout/keyguard_status_view" />
[COLOR="red"]<com.serajr.systemui.navigationdrawer.CustomDrawerLayout android:id="@id/custom_drawer_layout" android:layout_width="fill_parent" android:layout_height="fill_parent" android:layout_marginBottom="48.0dip">[/COLOR]
<include layout="@layout/somc_keyguard_voice_unlock_microphone_frame" />
<TextView android:textAppearance="@style/TextAppearance.StatusBar.Expanded.Network.EmergencyOnly" android:gravity="center" android:id="@id/emergency_calls_only" android:padding="4.0dip" android:visibility="gone" android:layout_width="fill_parent" android:layout_height="wrap_content" />
<FrameLayout android:layout_width="fill_parent" android:layout_height="wrap_content">
<include layout="@layout/msim_status_bar_expanded_header" />
<com.android.systemui.statusbar.phone.NotificationsQuickSettingsContainer android:layout_gravity="center|top|clip_horizontal" android:id="@id/notification_container_parent" android:clipChildren="false" android:clipToPadding="false" android:layout_width="fill_parent" android:layout_height="fill_parent">
<com.android.systemui.statusbar.phone.ObservableScrollView android:layout_gravity="center|top|clip_horizontal" android:id="@id/scroll_view" android:scrollbars="none" android:layout_width="@dimen/notification_panel_width" android:layout_height="fill_parent" android:fillViewport="true" android:overScrollMode="never">
<LinearLayout android:orientation="vertical" android:layout_width="fill_parent" android:layout_height="wrap_content">
<include android:layout_width="fill_parent" android:layout_height="wrap_content" android:layout_marginTop="@dimen/status_bar_header_height_expanded" android:layout_marginStart="@dimen/notification_side_padding" android:layout_marginEnd="@dimen/notification_side_padding" layout="@layout/qs_panel" />
<View android:id="@id/reserve_notification_space" android:layout_width="fill_parent" android:layout_height="@dimen/min_stack_height" android:layout_marginTop="@dimen/notifications_top_padding" />
<View android:layout_width="fill_parent" android:layout_height="@dimen/notification_side_padding" />
</LinearLayout>
</com.android.systemui.statusbar.phone.ObservableScrollView>
<com.android.systemui.statusbar.stack.NotificationStackScrollLayout android:layout_gravity="center|top|clip_horizontal" android:id="@id/notification_stack_scroller" android:layout_width="@dimen/notification_panel_width" android:layout_height="fill_parent" android:layout_marginBottom="@dimen/close_handle_underlap" />
<ViewStub android:layout_gravity="end" android:id="@id/keyguard_user_switcher" android:layout="@layout/keyguard_user_switcher" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginTop="@dimen/status_bar_header_height_keyguard" />
<include android:visibility="invisible" layout="@layout/keyguard_status_bar" />
</com.android.systemui.statusbar.phone.NotificationsQuickSettingsContainer>
</FrameLayout>
[COLOR="red"]<LinearLayout android:layout_gravity="end" android:orientation="vertical" android:background="@color/custom_drawer_layout_bg" android:layout_width="@dimen/custom_drawer_layout_width" android:layout_height="fill_parent">
<TextView android:gravity="center" android:layout_width="fill_parent" android:layout_height="wrap_content" android:text="@string/custom_drawer_layout_header_text" style="@style/power_toggles_text_appearance" />
<FrameLayout android:layout_width="fill_parent" android:layout_height="0.0dip" android:layout_weight="1.0">
<com.serajr.powertoggles.PowerToggles android:id="@id/power_toggles" android:layout_width="fill_parent" android:layout_height="wrap_content" />
</FrameLayout>
</LinearLayout>
</com.serajr.systemui.navigationdrawer.CustomDrawerLayout>[/COLOR]
<include android:visibility="gone" layout="@layout/keyguard_bottom_area" />
<com.android.systemui.statusbar.AlphaOptimizedView android:layout_gravity="bottom" android:id="@id/qs_navbar_scrim" android:background="@drawable/qs_navbar_scrim" android:visibility="invisible" android:layout_width="fill_parent" android:layout_height="96.0dip" />
</com.android.systemui.statusbar.phone.NotificationPanelView>

-Save

-Recompile

-Sign