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

Commit 1da01fdf authored by Neha Jain's avatar Neha Jain Committed by Automerger Merge Worker
Browse files

Merge "Limit keyguard views on alt displays" into sc-dev am: b3deaf2b am:...

Merge "Limit keyguard views on alt displays" into sc-dev am: b3deaf2b am: 8ed8e0b1 am: fc522e0e am: 9c1a8627

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15547527

Change-Id: I95910b5750dd05dccecc45898e7099a0162e93d8
parents cecd596e 9c1a8627
Loading
Loading
Loading
Loading
+19 −0
Original line number Diff line number Diff line
@@ -98,6 +98,8 @@ public class KeyguardClockSwitchController extends ViewController<KeyguardClockS
    private final KeyguardUnlockAnimationController mKeyguardUnlockAnimationController;
    private SmartspaceTransitionController mSmartspaceTransitionController;

    private boolean mOnlyClock = false;

    @Inject
    public KeyguardClockSwitchController(
            KeyguardClockSwitch keyguardClockSwitch,
@@ -129,6 +131,13 @@ public class KeyguardClockSwitchController extends ViewController<KeyguardClockS
        mSmartspaceTransitionController = smartspaceTransitionController;
    }

    /**
     * Mostly used for alternate displays, limit the information shown
     */
    public void setOnlyClock(boolean onlyClock) {
        mOnlyClock = onlyClock;
    }

    /**
     * Attach the controller to the view it relates to.
     */
@@ -169,6 +178,16 @@ public class KeyguardClockSwitchController extends ViewController<KeyguardClockS
        }
        mColorExtractor.addOnColorsChangedListener(mColorsListener);
        mView.updateColors(getGradientColors());

        if (mOnlyClock) {
            View ksa = mView.findViewById(R.id.keyguard_status_area);
            ksa.setVisibility(View.GONE);

            View nic = mView.findViewById(
                    R.id.left_aligned_notification_icon_container);
            nic.setVisibility(View.GONE);
            return;
        }
        updateAodIcons();

        if (mSmartspaceController.isSmartspaceEnabled()) {
+1 −0
Original line number Diff line number Diff line
@@ -332,6 +332,7 @@ public class KeyguardDisplayManager {
                    .build(findViewById(R.id.clock))
                    .getKeyguardClockSwitchController();

            mKeyguardClockSwitchController.setOnlyClock(true);
            mKeyguardClockSwitchController.init();
        }