Merge "Keeps power key intercepted during a panic gesture" into sc-dev am: 4ee67cf14e

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15389276

Change-Id: I2310bcba2369228cd28ba2db9d39654d1439ab64
This commit is contained in:
Arthur Hung
2021-07-28 02:42:44 +00:00
committed by Automerger Merge Worker

View File

@@ -3844,9 +3844,13 @@ public class PhoneWindowManager implements WindowManagerPolicy {
}
mCameraGestureTriggered = false;
final MutableBoolean outLaunched = new MutableBoolean(false);
mGestureLauncherService.interceptPowerKeyDown(event, interactive, outLaunched);
final boolean intercept =
mGestureLauncherService.interceptPowerKeyDown(event, interactive, outLaunched);
if (!outLaunched.value) {
return false;
// If GestureLauncherService intercepted the power key, but didn't launch camera app,
// we should still return the intercept result. This prevents the single key gesture
// detector from processing the power key later on.
return intercept;
}
mCameraGestureTriggered = true;
if (mRequestedOrSleepingDefaultDisplay) {