Cyanogenmod hide clock from statusbar?


dr0pscorp

Members
Oct 28, 2014
1
11
Hi there Im running Cyanogenmod with 4.2.2 and already decompiled SystemUI.apk but now in \SystemUI\smali\com\android\systemui\statusbar\policy i see a Clock.smali and Clock$1.smali.

Clock.smali
Code:
.line 100
    invoke-virtual {p0}, Lcom/android/systemui/statusbar/policy/Clock;->updateClock()V

    .line 101
    return-void
.end method

(...)

.line 110
    :cond_0
    return-void
.end method

.method final updateClock()V

Clock$1.smali

Code:
.line 129
    .end local v2          #tz:Ljava/lang/String;
    :cond_0
    :goto_0
    iget-object v3, p0, Lcom/android/systemui/statusbar/policy/Clock$1;->this$0:Lcom/android/systemui/statusbar/policy/Clock;

    invoke-virtual {v3}, Lcom/android/systemui/statusbar/policy/Clock;->updateClock()V


Which file is to modify and where? Im following this guide: http://xiaomi.eu/community/threads/q-removing-the-clock-from-the-status-bar.5603/ but stuck t this point because the code its the same but the lines not. I suspect that is the file clock.smali and do this:
Add the following code BEFORE the line above
const v1, 0x8
invoke-virtual {p0, v1}, Lcom/android/systemui/statusbar/Clock;->setVisibility(I)V
but not sure, i dont want to brick my tablet (again).

This is to fix problems in statusbar, the clock is overlapping wireless connection name...not serious but it is annoying.
 
Last edited:
MiuiSystemUI.apk Decompile. Re/Layout > status_bar_simple

Clock Line Added Kod: "android:visibility="gone""

Orjinal Kod:
Code:
            <com.android.systemui.statusbar.policy.Clock android:textAppearance="@style/TextAppearance.StatusBar.Clock" android:gravity="center" android:id="@id/clock" android:paddingLeft="3.0dip" android:paddingRight="3.0dip" android:paddingBottom="@dimen/statusbar_text_bottom_padding" android:layout_width="wrap_content" android:layout_height="fill_parent" android:singleLine="true" />

Editing Kod:
Code:
            <com.android.systemui.statusbar.policy.Clock android:textAppearance="@style/TextAppearance.StatusBar.Clock" android:gravity="center" android:visibility="gone" android:id="@id/clock" android:paddingLeft="3.0dip" android:paddingRight="3.0dip" android:paddingBottom="@dimen/statusbar_text_bottom_padding" android:layout_width="wrap_content" android:layout_height="fill_parent" android:singleLine="true" />