[Sony Cross-Device Development Themes and Apps] venkat kamesh:
SystemUI.apk

1. First Decompile Your Systemui.apk

2. Download this Attachment View attachment 3579382

3. Extract from zip and replace the smali codes

4. Now look into SystemUI.apk\smali\com\android\systemui\statusbar\phone\PhoneStatusBar.smali

Find this method .method public showClock(Z)V

and Replace the complete method as below ( copy and replace the method )

.method public showClock(Z)V
.locals 10

.prologue
const/4 v9, -0x2

const/4 v1, 0x1

const/4 v2, 0x0

const/16 v4, 0x8

.line 3874
iget-object v0, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mStatusBarView:Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;

if-nez v0, :cond_1

.line 3894
:cond_0
:goto_0
return-void

.line 3875
:cond_1
iget-object v0, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mContext:Landroid/content/Context;

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

move-result-object v3

.line 3876
iget-object v0, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mStatusBarView:Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;

const v5, 0x7f10008e #<public type="id" name="clock"

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

move-result-object v5

.line 3877
iget-object v0, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mStatusBarView:Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;

const v6, 0x7f1001c7 #<public type="id" name="center_clock"

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

move-result-object v6

.line 3878
iget-object v0, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mStatusBarView:Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;

const v7, 0x7f1001c8 #<public type="id" name="left_clock"

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

move-result-object v7

.line 3879
const-string v0, "status_bar_clock"

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

move-result v0

if-ne v0, v1, :cond_5

move v0, v1

.line 3882
:goto_1
const-string v8, "statusbar_clock_style"

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

move-result v8

.line 3885
if-nez v8, :cond_2

if-eqz v5, :cond_2

.line 3886
if-eqz p1, :cond_7

if-eqz v0, :cond_6

move v3, v2

:goto_2
invoke-virtual {v5, v3}, Landroid/view/View;->setVisibility(I)V

.line 3888
:cond_2
if-ne v8, v1, :cond_3

if-eqz v6, :cond_3

.line 3889
if-eqz p1, :cond_9

if-eqz v0, :cond_8

move v1, v2

:goto_3
invoke-virtual {v6, v1}, Landroid/view/View;->setVisibility(I)V

.line 3891
:cond_3
const/4 v1, 0x2

if-ne v8, v1, :cond_0

if-eqz v7, :cond_0

.line 3892
if-eqz p1, :cond_4

if-eqz v0, :cond_4

move v4, v2

:cond_4
invoke-virtual {v7, v4}, Landroid/view/View;->setVisibility(I)V

goto :goto_0

:cond_5
move v0, v2

.line 3879
goto :goto_1

:cond_6
move v3, v4

.line 3886
goto :goto_2

:cond_7
move v3, v4

goto :goto_2

:cond_8
move v1, v4

.line 3889
goto :goto_3

:cond_9
move v1, v4

goto :goto_3
.end method

5. Now find below code at systemui.apk/re/layout/status_bar.xml

<com.android.systemui.statusbar.StatusBarIconView android:id="@id/moreIcon" android:visibility="gone" android:layout_width="@dimen/status_bar_icon_size" android:layout_height="fill_parent" android:src="@drawable/stat_notify_more" />

Above that add this code

<com.android.keyguard.AlphaOptimizedLinearLayout android:gravity="center" android:orientation="horizontal" android:id="@+id/left_clock_layout" android:layout_width="wrap_content" android:layout_height="fill_parent">
<com.android.systemui.statusbar.policy.ClockLeft android:textAppearance="@style/TextAppearance.StatusBar.Clock" android:gravity="center" android:id="@+id/left_clock" android:visibility="gone" android:layout_width="wrap_content" android:layout_height="fill_parent" android:singleLine="true" android:paddingEnd="4.0dip" />
</com.android.keyguard.AlphaOptimizedLinearLayout>

and look for this code

<ViewStub android:id="@id/ticker_stub" android:layout="@layout/status_bar_ticker" android:inflatedId="@id/ticker" android:layout_width="fill_parent" android:layout_height="fill_parent" />

Above this add this code

<com.android.keyguard.AlphaOptimizedLinearLayout android:gravity="center" android:orientation="horizontal" android:id="@+id/center_clock_layout" android:layout_width="fill_parent" android:layout_height="fill_parent">
<com.android.systemui.statusbar.policy.ClockCenter android:textAppearance="@style/TextAppearance.StatusBar.Clock" android:gravity="center" android:id="@+id/center_clock" android:visibility="gone" android:layout_width="wrap_content" android:layout_height="fill_parent" android:singleLine="true" />
</com.android.keyguard.AlphaOptimizedLinearLayout>

6.Open systemui.apk/re/values/ids.xml ( and these codes )

<item type="id" name="left_clock_layout">false</item>
<item type="id" name="left_clock">false</item>
<item type="id" name="center_clock_layout">false</item>
<item type="id" name="center_clock">false</item>

7. Now compile the SystemUI.apk and decompile it again ( to merge the public ID's )

Now look into Clock.smali ( the mergerd code )

find this id 0x7f090019 and replace as per your public id

<public type="color" name="status_bar_clock_color" id="0x7f090019" />

and in PhoneStatusBar.smali

0x7f10008e #<public type="id" name="clock"

0x7f1001c7 #<public type="id" name="center_clock"

0x7f1001c8 #<public type="id" name="left_clock"

8. Now recompile/sign the Apk and replace the app and reboot

Now you need to work for Settings Click here