Merge "Only allow resizeable Activity to create TaskFragment" into sc-v2-dev am: 8361670412
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/16145582 Change-Id: I70d1b6eeba79d9e289a624057acc45e50a40c043
This commit is contained in:
@@ -1177,6 +1177,12 @@ class WindowOrganizerController extends IWindowOrganizerController.Stub
|
|||||||
sendTaskFragmentOperationFailure(organizer, errorCallbackToken, exception);
|
sendTaskFragmentOperationFailure(organizer, errorCallbackToken, exception);
|
||||||
return;
|
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.
|
// The ownerActivity has to belong to the same app as the root Activity of the target Task.
|
||||||
final ActivityRecord rootActivity = ownerActivity.getTask().getRootActivity();
|
final ActivityRecord rootActivity = ownerActivity.getTask().getRootActivity();
|
||||||
if (rootActivity.getUid() != ownerActivity.getUid()) {
|
if (rootActivity.getUid() != ownerActivity.getUid()) {
|
||||||
|
|||||||
Reference in New Issue
Block a user