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

Commit f65513af authored by Robert Snoeberger's avatar Robert Snoeberger
Browse files

Check for header when restoring default clock.

This change tracks the state of the header in the smart space while a
custom clock is showing so that the correct digital clock size can be
restored when switching back to the default clock face.

Fixes: 135534500
Test: visual - take phone of dock and check size of default clock
Change-Id: Id4d1d46c94d8480f9675a3cf682a20a9706ba707
parent e288f13f
Loading
Loading
Loading
Loading
+11 −3
Original line number Diff line number Diff line
@@ -222,8 +222,13 @@ public class KeyguardClockSwitch extends RelativeLayout {
            mClockPlugin = null;
        }
        if (plugin == null) {
            if (mShowingHeader) {
                mClockView.setVisibility(View.GONE);
                mClockViewBold.setVisibility(View.VISIBLE);
            } else {
                mClockView.setVisibility(View.VISIBLE);
                mClockViewBold.setVisibility(View.INVISIBLE);
            }
            mKeyguardStatusArea.setVisibility(View.VISIBLE);
            return;
        }
@@ -401,10 +406,13 @@ public class KeyguardClockSwitch extends RelativeLayout {
     * these cases.
     */
    void setKeyguardShowingHeader(boolean hasHeader) {
        if (mShowingHeader == hasHeader || hasCustomClock()) {
        if (mShowingHeader == hasHeader) {
            return;
        }
        mShowingHeader = hasHeader;
        if (hasCustomClock()) {
            return;
        }

        float smallFontSize = mContext.getResources().getDimensionPixelSize(
                R.dimen.widget_small_font_size);