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

Commit a4bc6489 authored by Charles Chen's avatar Charles Chen Committed by Automerger Merge Worker
Browse files

Merge "Only allow resizeable Activity to create TaskFragment" into sc-v2-dev...

Merge "Only allow resizeable Activity to create TaskFragment" into sc-v2-dev am: 83616704 am: 9a610cae

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/16145582

Change-Id: I15110347c0f316d487251051f8814079bcf2a7f4
parents e2bef26d 9a610cae
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -1176,6 +1176,12 @@ class WindowOrganizerController extends IWindowOrganizerController.Stub
            sendTaskFragmentOperationFailure(organizer, errorCallbackToken, exception);
            return;
        }
        if (!ownerActivity.isResizeable()) {
            final IllegalArgumentException exception = new IllegalArgumentException("Not allowed"
                    + " to operate with non-resizable owner Activity");
            sendTaskFragmentOperationFailure(organizer, errorCallbackToken, exception);
            return;
        }
        // The ownerActivity has to belong to the same app as the root Activity of the target Task.
        final ActivityRecord rootActivity = ownerActivity.getTask().getRootActivity();
        if (rootActivity.getUid() != ownerActivity.getUid()) {