Merge "Don't access keyguard from instant apps." into pi-dev

am: e7bd4e7e8f

Change-Id: I5d5d8ea0c7b5756143b5140e4cf16ae584147345
This commit is contained in:
Svet Ganov
2018-06-07 22:12:45 -07:00
committed by android-build-merger

View File

@@ -2032,7 +2032,7 @@ public class PhoneWindow extends Window implements MenuBuilder.Callback {
* Do this in onKeyUp since the Search key is also used for
* chording quick launch shortcuts.
*/
if (getKeyguardManager().inKeyguardRestrictedInputMode()) {
if (isNotInstantAppAndKeyguardRestricted()) {
break;
}
if ((getContext().getResources().getConfiguration().uiMode
@@ -2056,6 +2056,11 @@ public class PhoneWindow extends Window implements MenuBuilder.Callback {
return false;
}
private boolean isNotInstantAppAndKeyguardRestricted() {
return !getContext().getPackageManager().isInstantApp()
&& getKeyguardManager().inKeyguardRestrictedInputMode();
}
@Override
protected void onActive() {
}