diff options
author | Android Build Coastguard Worker <android-build-coastguard-worker@google.com> | 2022-07-13 01:45:37 +0000 |
---|---|---|
committer | Android Build Coastguard Worker <android-build-coastguard-worker@google.com> | 2022-07-13 01:45:37 +0000 |
commit | 61e079266734ec5fb8b73de1b80f14e09abc2507 (patch) | |
tree | 36023f9d7c4253cf21faecdd4bab5ee0d1d83a05 | |
parent | 0d3ff311e6e80dee7fe88a2a2cfa272ce231c3c6 (diff) | |
parent | e32d71e67e7b6b10775010032b281e776a478832 (diff) | |
download | base-61e079266734ec5fb8b73de1b80f14e09abc2507.tar.gz |
Merge cherrypicks of [19206328] into tm-release.
Change-Id: I812528d76f37d6c88fdbb44920d25ea74e17c07f
-rw-r--r-- | services/core/java/com/android/server/wm/WindowOrganizerController.java | 19 |
1 files changed, 3 insertions, 16 deletions
diff --git a/services/core/java/com/android/server/wm/WindowOrganizerController.java b/services/core/java/com/android/server/wm/WindowOrganizerController.java index 64a5deb32fcb..aee66faa8faa 100644 --- a/services/core/java/com/android/server/wm/WindowOrganizerController.java +++ b/services/core/java/com/android/server/wm/WindowOrganizerController.java @@ -759,7 +759,7 @@ class WindowOrganizerController extends IWindowOrganizerController.Stub } if (parent.isAllowedToEmbedActivity(activity) != EMBEDDING_ALLOWED) { final Throwable exception = new SecurityException( - "The task fragment is not trusted to embed the given activity."); + "The task fragment is not allowed to embed the given activity."); sendTaskFragmentOperationFailure(organizer, errorCallbackToken, exception); break; } @@ -769,11 +769,6 @@ class WindowOrganizerController extends IWindowOrganizerController.Stub sendTaskFragmentOperationFailure(organizer, errorCallbackToken, exception); break; } - if (parent.smallerThanMinDimension(activity)) { - sendMinimumDimensionViolation(parent, activity.getMinDimensions(), - errorCallbackToken, "reparentActivityToTask"); - break; - } activity.reparent(parent, POSITION_TOP); effects |= TRANSACT_EFFECTS_LIFECYCLE; @@ -1583,10 +1578,10 @@ class WindowOrganizerController extends IWindowOrganizerController.Stub // We are reparenting activities to a new embedded TaskFragment, this operation is only // allowed if the new parent is trusted by all reparent activities. final boolean isEmbeddingDisallowed = oldParent.forAllActivities(activity -> - newParentTF.isAllowedToEmbedActivity(activity) == EMBEDDING_ALLOWED); + newParentTF.isAllowedToEmbedActivity(activity) != EMBEDDING_ALLOWED); if (isEmbeddingDisallowed) { final Throwable exception = new SecurityException( - "The new parent is not trusted to embed the activities."); + "The new parent is not allowed to embed the activities."); sendTaskFragmentOperationFailure(organizer, errorCallbackToken, exception); return; } @@ -1603,14 +1598,6 @@ class WindowOrganizerController extends IWindowOrganizerController.Stub sendTaskFragmentOperationFailure(organizer, errorCallbackToken, exception); return; } - final Point minDimensions = oldParent.calculateMinDimension(); - final Rect newParentBounds = newParentTF.getBounds(); - if (newParentBounds.width() < minDimensions.x - || newParentBounds.height() < minDimensions.y) { - sendMinimumDimensionViolation(newParentTF, minDimensions, errorCallbackToken, - "reparentTaskFragment"); - return; - } while (oldParent.hasChild()) { oldParent.getChildAt(0).reparent(newParentTF, POSITION_TOP); } |