Suppress a11y shortcut on emergency dialer

Suppressing whenever the keyguard is locked, not just when
it's showing. This should reduce false triggering.

Bug: 34820720
Test: Verfied that shortcut no longer activates on emergency
dialer or lock screen.

Change-Id: Ic43c11798f04217c2871efe7d0fa21dbf61fd953
This commit is contained in:
Phil Weaver
2017-02-14 16:51:55 -08:00
parent dc8912b2bd
commit 7eec37989f
2 changed files with 6 additions and 4 deletions

View File

@@ -167,8 +167,10 @@ public final class WindowManagerGlobal {
sWindowManagerService = IWindowManager.Stub.asInterface(
ServiceManager.getService("window"));
try {
sWindowManagerService = getWindowManagerService();
ValueAnimator.setDurationScale(sWindowManagerService.getCurrentAnimatorScale());
if (sWindowManagerService != null) {
ValueAnimator.setDurationScale(
sWindowManagerService.getCurrentAnimatorScale());
}
} catch (RemoteException e) {
throw e.rethrowFromSystemServer();
}

View File

@@ -5736,7 +5736,7 @@ public class PhoneWindowManager implements WindowManagerPolicy {
mScreenshotChordVolumeDownKeyConsumed = false;
cancelPendingPowerKeyAction();
interceptScreenshotChord();
if (!keyguardActive) {
if (!isKeyguardLocked()) {
interceptAccessibilityShortcutChord();
}
}
@@ -5754,7 +5754,7 @@ public class PhoneWindowManager implements WindowManagerPolicy {
mA11yShortcutChordVolumeUpKeyConsumed = false;
cancelPendingPowerKeyAction();
cancelPendingScreenshotChordAction();
if (!keyguardActive) {
if (!isKeyguardLocked()) {
interceptAccessibilityShortcutChord();
}
}