Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 3c11d465 authored by LuK1337's avatar LuK1337
Browse files

SystemUI: Disable clock auto hide feature for QS

Fixes: https://gitlab.com/LineageOS/issues/android/-/issues/5272
Change-Id: I1ffe7c24e9e8e4f4f771898197a56fede831c9c3
parent 5999fb0e
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -80,6 +80,7 @@
                    android:paddingStart="@dimen/status_bar_left_clock_starting_padding"
                    android:paddingEnd="@dimen/status_bar_left_clock_end_padding"
                    android:gravity="center_vertical|start"
                    systemui:isStatusBar="true"
                />

                <include layout="@layout/ongoing_call_chip" />
@@ -173,6 +174,7 @@
            android:singleLine="true"
            android:gravity="center"
            android:visibility="gone"
            systemui:isStatusBar="true"
        />
    </com.android.keyguard.AlphaOptimizedLinearLayout>

+1 −0
Original line number Diff line number Diff line
@@ -53,6 +53,7 @@
            android:paddingEnd="@dimen/status_bar_clock_end_padding"
            android:gravity="center_vertical|start"
            android:visibility="gone"
            systemui:isStatusBar="true"
        />
    </com.android.keyguard.AlphaOptimizedLinearLayout>
</LinearLayout>
+1 −0
Original line number Diff line number Diff line
@@ -46,6 +46,7 @@
            <enum name="small" value="1" />
            <enum name="gone" value="2" />
        </attr>
        <attr name="isStatusBar" format="boolean" />
        <attr name="showDark" format="boolean" />
    </declare-styleable>
    <attr name="orientation">
+7 −0
Original line number Diff line number Diff line
@@ -113,6 +113,8 @@ public class Clock extends TextView implements
    private boolean mShowSeconds;
    private Handler mSecondsHandler;

    private boolean mIsStatusBar;

    // Fields to cache the width so the clock remains at an approximately constant width
    private int mCharsAtCurrentWidth = -1;
    private int mCachedWidth = -1;
@@ -137,6 +139,7 @@ public class Clock extends TextView implements
                0, 0);
        try {
            mAmPmStyle = a.getInt(R.styleable.Clock_amPmStyle, mAmPmStyle);
            mIsStatusBar = a.getBoolean(R.styleable.Clock_isStatusBar, mIsStatusBar);
            mNonAdaptedColor = getCurrentTextColor();
        } finally {
            a.recycle();
@@ -243,6 +246,10 @@ public class Clock extends TextView implements
    }

    private void handleTaskStackListener(boolean register) {
        if (!mIsStatusBar) {
            // We don't support clock auto hide for quick settings.
            return;
        }
        if (register && !mTaskStackListenerRegistered) {
            TaskStackChangeListeners.getInstance().registerTaskStackListener(mTaskStackListener);
            mTaskStackListenerRegistered = true;