Improve camera launch time from double tap power

Wake the device up early when camera gesture is triggered and device is
going to sleep, this could speed up finishing going to sleep state and
prevent the display doing redundant turning off/on stuff when launching
camera.

Bug: 195788686
Test: double tap to trigger camera
Change-Id: I4533e0eecdc31861263e27af164b0a04b926e252
This commit is contained in:
Arthur Hung
2022-10-07 02:24:47 +00:00
parent 0ec0ceb9bb
commit 76473d0b5e

View File

@@ -4196,6 +4196,8 @@ public class PhoneWindowManager implements WindowManagerPolicy {
mCameraGestureTriggered = true;
if (mRequestedOrSleepingDefaultDisplay) {
mCameraGestureTriggeredDuringGoingToSleep = true;
// Wake device up early to prevent display doing redundant turning off/on stuff.
wakeUpFromPowerKey(event.getDownTime());
}
return true;
}