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

Commit 61f04734 authored by Robert Snoeberger's avatar Robert Snoeberger
Browse files

Disable custom clock faces in SystemUI

This will prevent custom clocks from persisting on dogfooders devices.

Bug: 136090066
Test: `adb shell settings put secure lock_screen_custom_clock_face
"com.android.keyguard.clock.BubbleClockController"` doesn't switch to
Bubble clock.

Change-Id: If9fc43295380d0bc37ca3df4c7187bd4faaf4bde
parent ceb2bc6e
Loading
Loading
Loading
Loading
+7 −2
Original line number Diff line number Diff line
@@ -49,6 +49,7 @@ import javax.inject.Named;
public class KeyguardClockSwitch extends RelativeLayout {

    private static final String TAG = "KeyguardClockSwitch";
    private static final boolean CUSTOM_CLOCKS_ENABLED = false;

    /**
     * Animation fraction when text is transitioned to/from bold.
@@ -192,7 +193,9 @@ public class KeyguardClockSwitch extends RelativeLayout {
    @Override
    protected void onAttachedToWindow() {
        super.onAttachedToWindow();
        if (CUSTOM_CLOCKS_ENABLED) {
            mClockManager.addOnClockChangedListener(mClockChangedListener);
        }
        mStatusBarStateController.addCallback(mStateListener);
        mSysuiColorExtractor.addOnColorsChangedListener(mColorsListener);
        updateColors();
@@ -201,7 +204,9 @@ public class KeyguardClockSwitch extends RelativeLayout {
    @Override
    protected void onDetachedFromWindow() {
        super.onDetachedFromWindow();
        if (CUSTOM_CLOCKS_ENABLED) {
            mClockManager.removeOnClockChangedListener(mClockChangedListener);
        }
        mStatusBarStateController.removeCallback(mStateListener);
        mSysuiColorExtractor.removeOnColorsChangedListener(mColorsListener);
        setClockPlugin(null);