Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 83946497 authored by Ricky Wai's avatar Ricky Wai
Browse files

Apply app switching protection on AppTask.moveToFront()

Bug: 129356848
Test: After pressing home button, apps can't be shown automatically
Change-Id: I0d50deae0024c61df3e68fc7cf2d63815a757ef9
parent d81cd262
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -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);