Send user-activity to power manager on lock icon long press

To reset the screen timeout so the display won’t go to sleep
so quickly after a lock icon longpress.

Test: Manually swipe on lock icon, screen still timeouts,
but if a longpress is detected, the screen timeout resets
Fixes: 236930064

Change-Id: Idc799a3e2f06638401acd999d9cce1967f263d9b
This commit is contained in:
Beverly
2023-03-30 16:41:27 +00:00
parent 84fd6c7823
commit c9350f8310

View File

@@ -283,11 +283,15 @@ public class NotificationShadeWindowViewController {
}
mLockIconViewController.onTouchEvent(
ev,
() -> mService.wakeUpIfDozing(
mClock.uptimeMillis(),
mView,
"LOCK_ICON_TOUCH",
PowerManager.WAKE_REASON_GESTURE)
/* onGestureDetectedRunnable */
() -> {
mService.userActivity();
mService.wakeUpIfDozing(
mClock.uptimeMillis(),
mView,
"LOCK_ICON_TOUCH",
PowerManager.WAKE_REASON_GESTURE);
}
);
// In case we start outside of the view bounds (below the status bar), we need to