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

Commit d8b63cd0 authored by Michael Wright's avatar Michael Wright
Browse files

Poke user activity when showing the global actions menu.

Since the power key is always consumed before queueing, and thus doesn't
ever contribute to user activity, we should just always poke user
activity when global actions is triggered to give the user time to
interact with it.

Bug: 31274295
Test: N/A
Change-Id: I9dd00726209c9a425bb2f105d1582eb5326a354c
parent 120e7bab
Loading
Loading
Loading
Loading
+3 −5
Original line number Diff line number Diff line
@@ -1655,12 +1655,10 @@ public class PhoneWindowManager implements WindowManagerPolicy {
        }
        final boolean keyguardShowing = isKeyguardShowingAndNotOccluded();
        mGlobalActions.showDialog(keyguardShowing, isDeviceProvisioned());
        if (keyguardShowing) {
        // since it took two seconds of long press to bring this up,
        // poke the wake lock so they have some time to see the dialog.
        mPowerManager.userActivity(SystemClock.uptimeMillis(), false);
    }
    }

    boolean isDeviceProvisioned() {
        return Settings.Global.getInt(