summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndroid (Google) Code Review <android-gerrit@google.com>2009-05-04 17:20:31 -0700
committerThe Android Open Source Project <initial-contribution@android.com>2009-05-04 17:20:31 -0700
commit176ef2dfa4f0741ab5fab0545de01d47ad2842be (patch)
treeef899b5d0306c764c912e4931a3f5700bc766baf
parent4b72c1eb9fb193b8a8cf0b9278b880c3e987f814 (diff)
parent1ab6e21237fc9f436be002d4f3821fce963a0a2a (diff)
downloadframeworks_base-176ef2dfa4f0741ab5fab0545de01d47ad2842be.zip
frameworks_base-176ef2dfa4f0741ab5fab0545de01d47ad2842be.tar.gz
frameworks_base-176ef2dfa4f0741ab5fab0545de01d47ad2842be.tar.bz2
am 1ab6e21: Merge change 909 into donut
Merge commit '1ab6e21237fc9f436be002d4f3821fce963a0a2a' * commit '1ab6e21237fc9f436be002d4f3821fce963a0a2a': Let screenOrientation="behind" works as expected
-rw-r--r--services/java/com/android/server/WindowManagerService.java14
1 files changed, 10 insertions, 4 deletions
diff --git a/services/java/com/android/server/WindowManagerService.java b/services/java/com/android/server/WindowManagerService.java
index 321b17e..3e75db1 100644
--- a/services/java/com/android/server/WindowManagerService.java
+++ b/services/java/com/android/server/WindowManagerService.java
@@ -2078,13 +2078,16 @@ public class WindowManagerService extends IWindowManager.Stub implements Watchdo
int pos = mAppTokens.size() - 1;
int curGroup = 0;
int lastOrientation = ActivityInfo.SCREEN_ORIENTATION_UNSPECIFIED;
+ boolean findingBehind = false;
boolean haveGroup = false;
boolean lastFullscreen = false;
while (pos >= 0) {
AppWindowToken wtoken = mAppTokens.get(pos);
pos--;
- // if we're about to tear down this window, don't use it for orientation
- if (!wtoken.hidden && wtoken.hiddenRequested) {
+ // if we're about to tear down this window and not seek for
+ // the behind activity, don't use it for orientation
+ if (!findingBehind
+ && (!wtoken.hidden && wtoken.hiddenRequested)) {
continue;
}
@@ -2108,10 +2111,12 @@ public class WindowManagerService extends IWindowManager.Stub implements Watchdo
}
}
int or = wtoken.requestedOrientation;
- // If this application is fullscreen, then just take whatever
+ // If this application is fullscreen, and didn't explicitly say
+ // to use the orientation behind it, then just take whatever
// orientation it has and ignores whatever is under it.
lastFullscreen = wtoken.appFullscreen;
- if (lastFullscreen) {
+ if (lastFullscreen
+ && or != ActivityInfo.SCREEN_ORIENTATION_BEHIND) {
return or;
}
// If this application has requested an explicit orientation,
@@ -2123,6 +2128,7 @@ public class WindowManagerService extends IWindowManager.Stub implements Watchdo
or == ActivityInfo.SCREEN_ORIENTATION_USER) {
return or;
}
+ findingBehind |= (or == ActivityInfo.SCREEN_ORIENTATION_BEHIND);
}
return ActivityInfo.SCREEN_ORIENTATION_UNSPECIFIED;
}