Loading services/core/java/com/android/server/wm/WindowOrganizerController.java +3 −16 Original line number Diff line number Diff line Loading @@ -817,7 +817,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; } Loading @@ -827,11 +827,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; Loading Loading @@ -1673,10 +1668,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; } Loading @@ -1693,14 +1688,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); } Loading Loading
services/core/java/com/android/server/wm/WindowOrganizerController.java +3 −16 Original line number Diff line number Diff line Loading @@ -817,7 +817,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; } Loading @@ -827,11 +827,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; Loading Loading @@ -1673,10 +1668,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; } Loading @@ -1693,14 +1688,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); } Loading