Revert "Only allow AM to update display orientation based on app containers"
This reverts commit 5f1ae6aaca78a14d25e28042df32df642ab3d29e.
This caused b/38021942.
Change-Id: Idb23e5ede7aaa4a927e148c0daab3f56ac449d66
Fixes: 38021942
Bug: 37550022
Test: manual
diff --git a/services/core/java/com/android/server/wm/DisplayContent.java b/services/core/java/com/android/server/wm/DisplayContent.java
index 92d26cb..3a90a35 100644
--- a/services/core/java/com/android/server/wm/DisplayContent.java
+++ b/services/core/java/com/android/server/wm/DisplayContent.java
@@ -1503,16 +1503,8 @@
return mImeWindowsContainers.forAllWindows(callback, traverseTopToBottom);
}
- /**
- * Returns the orientation that this display should be in factoring in its children containers.
- *
- * @param includeAppContainers True if then app containers (stacks, tasks, ...) should be
- * factored in when determining the orientation. If false only
- * non-app/system containers will be used to determine the returned
- * orientation.
- * @return The orientation the display should be in.
- */
- int getOrientation(boolean includeAppContainers) {
+ @Override
+ int getOrientation() {
final WindowManagerPolicy policy = mService.mPolicy;
if (mService.mDisplayFrozen) {
@@ -1541,14 +1533,8 @@
}
}
- // Top system windows are not requesting an orientation. Get orientation from app containers
- // if allowed. Otherwise, return the last orientation.
- return includeAppContainers ? mTaskStackContainers.getOrientation() : mLastOrientation;
- }
-
- @Override
- int getOrientation() {
- return getOrientation(true /* includeAppContainers */);
+ // Top system windows are not requesting an orientation. Start searching from apps.
+ return mTaskStackContainers.getOrientation();
}
void updateDisplayInfo() {