summaryrefslogtreecommitdiffstats
path: root/services
diff options
context:
space:
mode:
authorCraig Mautner <cmautner@google.com>2014-05-07 10:35:34 -0700
committerCraig Mautner <cmautner@google.com>2014-05-07 10:35:34 -0700
commit19ab828aa581e398e50c6f42ff4863c6ee522203 (patch)
tree25ebbb4c6c57a9fc9ed307f1067c4782c0afac1a /services
parent4297409e458646db914d78f20aef71606622ca7e (diff)
downloadframeworks_base-19ab828aa581e398e50c6f42ff4863c6ee522203.zip
frameworks_base-19ab828aa581e398e50c6f42ff4863c6ee522203.tar.gz
frameworks_base-19ab828aa581e398e50c6f42ff4863c6ee522203.tar.bz2
Account for windows on non-app display.
When an app launches a window on a different display than the one the app is on, make sure and return the window's display, not the app's display. Fixes bug 12906650. Change-Id: Ie418db023672f7944729fc60d457c4c1d850dc1f
Diffstat (limited to 'services')
-rw-r--r--services/core/java/com/android/server/wm/WindowState.java8
1 files changed, 7 insertions, 1 deletions
diff --git a/services/core/java/com/android/server/wm/WindowState.java b/services/core/java/com/android/server/wm/WindowState.java
index 4318b0e..e746c1a 100644
--- a/services/core/java/com/android/server/wm/WindowState.java
+++ b/services/core/java/com/android/server/wm/WindowState.java
@@ -299,6 +299,7 @@ final class WindowState implements WindowManagerPolicy.WindowState {
boolean mHasSurface = false;
+ boolean mNotOnAppsDisplay = false;
DisplayContent mDisplayContent;
/** When true this window can be displayed on screens owther than mOwnerUid's */
@@ -430,6 +431,10 @@ final class WindowState implements WindowManagerPolicy.WindowState {
}
mRootToken = appToken;
mAppToken = appToken.appWindowToken;
+ if (mAppToken != null) {
+ final DisplayContent appDisplay = getDisplayContent();
+ mNotOnAppsDisplay = displayContent != appDisplay;
+ }
mWinAnimator = new WindowStateAnimator(this);
mWinAnimator.mAlpha = a.alpha;
@@ -717,7 +722,8 @@ final class WindowState implements WindowManagerPolicy.WindowState {
}
public DisplayContent getDisplayContent() {
- return mAppToken == null ? mDisplayContent : getStack().getDisplayContent();
+ return mAppToken == null || mNotOnAppsDisplay ?
+ mDisplayContent : getStack().getDisplayContent();
}
public int getDisplayId() {