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

Commit afe77db9 authored by Steve Elliott's avatar Steve Elliott Committed by android-build-merger
Browse files

DO NOT MERGE: Properly reflect device lock state in Global Action panel.

am: db386ab0

Change-Id: I35bd0a54e6338bd5cd92c10522b74ddc179c1ff2
parents b0100311 db386ab0
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
@@ -86,6 +86,7 @@ import com.android.internal.util.ScreenRecordHelper;
import com.android.internal.util.ScreenshotHelper;
import com.android.internal.view.RotationPolicy;
import com.android.internal.widget.LockPatternUtils;
import com.android.keyguard.KeyguardUpdateMonitor;
import com.android.systemui.Dependency;
import com.android.systemui.Interpolators;
import com.android.systemui.MultiListLayout;
@@ -213,11 +214,13 @@ public class GlobalActionsDialog implements DialogInterface.OnDismissListener,
        Dependency.get(ConfigurationController.class).addCallback(this);

        mActivityStarter = Dependency.get(ActivityStarter.class);
        KeyguardUpdateMonitor keyguardUpdateMonitor = KeyguardUpdateMonitor.getInstance(context);
        UnlockMethodCache unlockMethodCache = UnlockMethodCache.getInstance(context);
        unlockMethodCache.addListener(
                () -> {
                    if (mDialog != null && mDialog.mPanelController != null) {
                        boolean locked = !unlockMethodCache.canSkipBouncer();
                        boolean locked = !unlockMethodCache.canSkipBouncer()
                                && keyguardUpdateMonitor.isKeyguardVisible();
                        mDialog.mPanelController.onDeviceLockStateChanged(locked);
                    }
                });