Allow home activity to be resizeable if it explicitly wants to be.
We previously didn't allow home activities to be resizeable due to not fully
understanding how the UX would work. We now have a better idea of how the UX will
work. However, since this is a behavior change for home activities we require them
to explicitly say they want to be resizeable vs. the framework assuming they can
be resizeable based on their target sdk.
Bug: 30982291
Test: cts/hostsidetests/services/activityandwindowmanager/util/run-test android.server.cts
Change-Id: I41aefc8c3b3da4c2cf66be81835222196df3ef26
diff --git a/services/core/java/com/android/server/wm/Task.java b/services/core/java/com/android/server/wm/Task.java
index d18db6e..19c9b7d 100644
--- a/services/core/java/com/android/server/wm/Task.java
+++ b/services/core/java/com/android/server/wm/Task.java
@@ -277,8 +277,7 @@
}
boolean isResizeable() {
- return !mHomeTask
- && (ActivityInfo.isResizeableMode(mResizeMode) || mService.mForceResizableTasks);
+ return ActivityInfo.isResizeableMode(mResizeMode) || mService.mForceResizableTasks;
}
boolean isOnTopLauncher() {
@@ -286,7 +285,7 @@
}
boolean cropWindowsToStackBounds() {
- return !mHomeTask && isResizeable();
+ return isResizeable();
}
boolean isHomeTask() {
@@ -560,7 +559,7 @@
@Override
public boolean dimFullscreen() {
- return isHomeTask() || isFullscreen();
+ return isFullscreen();
}
boolean isFullscreen() {