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

Commit 893a2b05 authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge "DO NOT MERGE: Properly reflect device lock state in Global Action panel." into qt-qpr1-dev

parents e93ab1d3 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);
                    }
                });