Merge "Apply app switching protection on AppTask.moveToFront()" into qt-dev

This commit is contained in:
Ricky Wai
2019-04-12 14:43:44 +00:00
committed by Android (Google) Code Review

View File

@@ -106,6 +106,10 @@ class AppTaskImpl extends IAppTask.Stub {
final long origId = Binder.clearCallingIdentity();
try {
synchronized (mService.mGlobalLock) {
if (!mService.checkAppSwitchAllowedLocked(callingPid, callingUid, -1, -1,
"Move to front")) {
return;
}
WindowProcessController callerApp = null;
if (appThread != null) {
callerApp = mService.getProcessController(appThread);