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

Commit db386ab0 authored by Steve Elliott's avatar Steve Elliott
Browse files

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

Test: manual
Fixes: 143906419
Change-Id: Idb6d396fa04a8c45e82515e89a27a3df21dc9ac0
parent db4ad2af
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);
                    }
                });