summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author TreeHugger Robot <treehugger-gerrit@google.com> 2016-09-29 14:41:02 +0000
committer Android (Google) Code Review <android-gerrit@google.com> 2016-09-29 14:41:07 +0000
commit5b02bb416448e9f2b587cfa0c733c9bd24e6490f (patch)
tree6a23e3a1d7484fa015f60db030ab6ec30340a929
parenta92a8cf905d385fa28892ebc9d7fd490cf38015a (diff)
parenta77e146aef0fd3956d6860bba74c55b4d53402f7 (diff)
Merge "Use last orientation if contents of a display wants behind orientation"
-rw-r--r--services/core/java/com/android/server/wm/DisplayContent.java3
1 files changed, 2 insertions, 1 deletions
diff --git a/services/core/java/com/android/server/wm/DisplayContent.java b/services/core/java/com/android/server/wm/DisplayContent.java
index a09c5976e2ec..66682d8051dd 100644
--- a/services/core/java/com/android/server/wm/DisplayContent.java
+++ b/services/core/java/com/android/server/wm/DisplayContent.java
@@ -20,6 +20,7 @@ import static android.app.ActivityManager.StackId.DOCKED_STACK_ID;
import static android.app.ActivityManager.StackId.FREEFORM_WORKSPACE_STACK_ID;
import static android.app.ActivityManager.StackId.HOME_STACK_ID;
import static android.app.ActivityManager.StackId.PINNED_STACK_ID;
+import static android.content.pm.ActivityInfo.SCREEN_ORIENTATION_BEHIND;
import static android.content.pm.ActivityInfo.SCREEN_ORIENTATION_UNSET;
import static android.content.pm.ActivityInfo.SCREEN_ORIENTATION_UNSPECIFIED;
import static android.view.WindowManager.DOCKED_BOTTOM;
@@ -271,7 +272,7 @@ class DisplayContent extends WindowContainer<TaskStack> {
}
final int orientation = super.getOrientation();
- if (orientation != SCREEN_ORIENTATION_UNSET) {
+ if (orientation != SCREEN_ORIENTATION_UNSET && orientation != SCREEN_ORIENTATION_BEHIND) {
if (DEBUG_ORIENTATION) Slog.v(TAG_WM,
"App is requesting an orientation, return " + orientation);
return orientation;