summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Yunfan Chen <yunfanc@google.com> 2024-03-14 14:11:09 +0000
committer Android (Google) Code Review <android-gerrit@google.com> 2024-03-14 14:11:09 +0000
commit256a2727b39bf163f34f40f01bbf07e5fb944ea7 (patch)
tree72bc892a33e1b9b5074cf90128ee4b3f268e2b55
parent90ce0b13a36158250852cbfbc6e2861ed12939ff (diff)
parentbceca00657662f51bd9687b875c03ba7b5d763a8 (diff)
Merge "Override behavior for overview temporarily" into main
-rw-r--r--services/core/java/com/android/server/wm/ActivityRecord.java12
1 files changed, 11 insertions, 1 deletions
diff --git a/services/core/java/com/android/server/wm/ActivityRecord.java b/services/core/java/com/android/server/wm/ActivityRecord.java
index 6fa6957f2949..04e298810dad 100644
--- a/services/core/java/com/android/server/wm/ActivityRecord.java
+++ b/services/core/java/com/android/server/wm/ActivityRecord.java
@@ -328,6 +328,7 @@ import android.os.Process;
import android.os.RemoteCallbackList;
import android.os.RemoteException;
import android.os.SystemClock;
+import android.os.SystemProperties;
import android.os.Trace;
import android.os.UserHandle;
import android.service.contentcapture.ActivityEvent;
@@ -1003,6 +1004,10 @@ final class ActivityRecord extends WindowToken implements WindowManagerService.A
// Whether the Activity allows state sharing in untrusted embedding
private final boolean mAllowUntrustedEmbeddingStateSharing;
+ // TODO(b/329378309): Remove this once the overview handles the configuration correctly.
+ private static final boolean OVERRIDE_OVERVIEW_CONFIGURATION =
+ SystemProperties.getBoolean("persist.wm.debug.override_overview_configuration", true);
+
// Records whether client has overridden the WindowAnimation_(Open/Close)(Enter/Exit)Animation.
private CustomAppTransition mCustomOpenTransition;
private CustomAppTransition mCustomCloseTransition;
@@ -8608,7 +8613,12 @@ final class ActivityRecord extends WindowToken implements WindowManagerService.A
if (rotation == ROTATION_UNDEFINED && !isFixedRotationTransforming()) {
rotation = mDisplayContent.getRotation();
}
- if (!mWmService.mFlags.mInsetsDecoupledConfiguration
+ final int activityType = inOutConfig.windowConfiguration.getActivityType();
+ if (OVERRIDE_OVERVIEW_CONFIGURATION
+ && (activityType == ACTIVITY_TYPE_HOME || activityType == ACTIVITY_TYPE_RECENTS)) {
+ // Do not early return and provide the override. This should be removed shortly as we
+ // don't override 1P components.
+ } else if (!mWmService.mFlags.mInsetsDecoupledConfiguration
|| info.isChangeEnabled(INSETS_DECOUPLED_CONFIGURATION_ENFORCED)
|| getCompatDisplayInsets() != null
|| isFloating(parentWindowingMode) || fullBounds == null