diff options
author | 2022-05-18 17:04:39 +0000 | |
---|---|---|
committer | 2022-05-18 17:04:39 +0000 | |
commit | 6dcbc863379d76ab1cbd634b0816f96cda1824e0 (patch) | |
tree | a6b0af6e204e43496aa9aec8120d76fe89566327 | |
parent | 17eb72c80a61d7ed293f32bef0ec2d6e76f164da (diff) | |
parent | c25fb4f684015668c0aca5a38235fd030574aff2 (diff) |
Merge "[ATMS] Remove some dead code from Task" into tm-qpr-dev am: c893507c66 am: c25fb4f684
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/18439362
Change-Id: If0d32e034685f4363764a0e84f674d23c231e485
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
-rw-r--r-- | services/core/java/com/android/server/wm/Task.java | 4 | ||||
-rw-r--r-- | services/tests/wmtests/src/com/android/server/wm/TaskTests.java | 29 |
2 files changed, 1 insertions, 32 deletions
diff --git a/services/core/java/com/android/server/wm/Task.java b/services/core/java/com/android/server/wm/Task.java index eea9d6c123ae..4a643ef6a787 100644 --- a/services/core/java/com/android/server/wm/Task.java +++ b/services/core/java/com/android/server/wm/Task.java @@ -2004,10 +2004,6 @@ class Task extends TaskFragment { Rect outOverrideBounds = getResolvedOverrideConfiguration().windowConfiguration.getBounds(); if (windowingMode == WINDOWING_MODE_FULLSCREEN) { - if (!isOrganized()) { - // Use empty bounds to indicate "fill parent". - outOverrideBounds.setEmpty(); - } // The bounds for fullscreen mode shouldn't be adjusted by minimal size. Otherwise if // the parent or display is smaller than the size, the content may be cropped. return; diff --git a/services/tests/wmtests/src/com/android/server/wm/TaskTests.java b/services/tests/wmtests/src/com/android/server/wm/TaskTests.java index a34615c41cc9..44b1d83580d6 100644 --- a/services/tests/wmtests/src/com/android/server/wm/TaskTests.java +++ b/services/tests/wmtests/src/com/android/server/wm/TaskTests.java @@ -496,34 +496,6 @@ public class TaskTests extends WindowTestsBase { assertEquals(reqBounds.height(), task.getBounds().height()); } - /** Tests that the task bounds adjust properly to changes between FULLSCREEN and FREEFORM */ - @Test - public void testBoundsOnModeChangeFreeformToFullscreen() { - DisplayContent display = mAtm.mRootWindowContainer.getDefaultDisplay(); - Task rootTask = new TaskBuilder(mSupervisor).setDisplay(display).setCreateActivity(true) - .setWindowingMode(WINDOWING_MODE_FREEFORM).build(); - Task task = rootTask.getBottomMostTask(); - task.getRootActivity().setOrientation(SCREEN_ORIENTATION_UNSPECIFIED); - DisplayInfo info = new DisplayInfo(); - display.mDisplay.getDisplayInfo(info); - final Rect fullScreenBounds = new Rect(0, 0, info.logicalWidth, info.logicalHeight); - final Rect freeformBounds = new Rect(fullScreenBounds); - freeformBounds.inset((int) (freeformBounds.width() * 0.2), - (int) (freeformBounds.height() * 0.2)); - task.setBounds(freeformBounds); - - assertEquals(freeformBounds, task.getBounds()); - - // FULLSCREEN inherits bounds - rootTask.setWindowingMode(WINDOWING_MODE_FULLSCREEN); - assertEquals(fullScreenBounds, task.getBounds()); - assertEquals(freeformBounds, task.mLastNonFullscreenBounds); - - // FREEFORM restores bounds - rootTask.setWindowingMode(WINDOWING_MODE_FREEFORM); - assertEquals(freeformBounds, task.getBounds()); - } - /** * Tests that a task with forced orientation has orientation-consistent bounds within the * parent. @@ -589,6 +561,7 @@ public class TaskTests extends WindowTestsBase { // FULLSCREEN letterboxes bounds on activity level, no constraint on task level. rootTask.setWindowingMode(WINDOWING_MODE_FULLSCREEN); + rootTask.setBounds(null); assertThat(task.getBounds().height()).isGreaterThan(task.getBounds().width()); assertThat(top.getBounds().width()).isGreaterThan(top.getBounds().height()); assertEquals(fullScreenBoundsPort, task.getBounds()); |