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

Commit 8d53b533 authored by Bartosz Chominski's avatar Bartosz Chominski
Browse files

Catch the missing return path when clearing Binder identity

Bug: 429332474
Flag: com.android.window.flags.enable_window_repositioning_api
Test: atest CtsWindowManagerDeviceOther:TaskMoveTests
Change-Id: I35338cc727ce5fecf3338579c915375e4ed0c021
parent 8066d555
Loading
Loading
Loading
Loading
+6 −6
Original line number Diff line number Diff line
@@ -188,13 +188,13 @@ class AppTaskImpl extends IAppTask.Stub {
        final int origCallingPid = Binder.getCallingPid();
        final int origCallingUid = Binder.getCallingUid();
        final long origId = Binder.clearCallingIdentity();
        try {
            if (mService.checkPermission(REPOSITION_SELF_WINDOWS, origCallingPid, origCallingUid)
                    != PERMISSION_GRANTED) {
                reportTaskMoveRequestResult(
                        RESULT_FAILED_NO_PERMISSIONS, INVALID_DISPLAY, null /* bounds */, callback);
                return;
            }
        try {
            synchronized (mService.mGlobalLock) {
                final Task task = mService.mRootWindowContainer.anyTaskForId(mTaskId);
                if (task == null) {