summaryrefslogtreecommitdiffstats
path: root/core/java/android/view
diff options
context:
space:
mode:
authorWale Ogunwale <ogunwale@google.com>2015-10-16 16:14:45 +0000
committerAndroid (Google) Code Review <android-gerrit@google.com>2015-10-16 16:14:45 +0000
commitbe6555105a9325d0b7073c08a0bd4dc0b5ce1fb3 (patch)
tree4b0bb26cb248d4e8acabfa22b2867dc0efd41795 /core/java/android/view
parent8d6d735fa8cea74f53ba29063b72b856fef69d8e (diff)
parent20ebb4c2d492b17fa8aec931e16305463de1f550 (diff)
downloadframeworks_base-be6555105a9325d0b7073c08a0bd4dc0b5ce1fb3.zip
frameworks_base-be6555105a9325d0b7073c08a0bd4dc0b5ce1fb3.tar.gz
frameworks_base-be6555105a9325d0b7073c08a0bd4dc0b5ce1fb3.tar.bz2
Merge "Disassociate system windows from apps" into mnc-dr-dev
Diffstat (limited to 'core/java/android/view')
-rw-r--r--core/java/android/view/Window.java29
1 files changed, 21 insertions, 8 deletions
diff --git a/core/java/android/view/Window.java b/core/java/android/view/Window.java
index 07984e9..c222a82 100644
--- a/core/java/android/view/Window.java
+++ b/core/java/android/view/Window.java
@@ -578,7 +578,7 @@ public abstract class Window {
void adjustLayoutParamsForSubWindow(WindowManager.LayoutParams wp) {
CharSequence curTitle = wp.getTitle();
if (wp.type >= WindowManager.LayoutParams.FIRST_SUB_WINDOW &&
- wp.type <= WindowManager.LayoutParams.LAST_SUB_WINDOW) {
+ wp.type <= WindowManager.LayoutParams.LAST_SUB_WINDOW) {
if (wp.token == null) {
View decor = peekDecorView();
if (decor != null) {
@@ -588,25 +588,38 @@ public abstract class Window {
if (curTitle == null || curTitle.length() == 0) {
String title;
if (wp.type == WindowManager.LayoutParams.TYPE_APPLICATION_MEDIA) {
- title="Media";
+ title = "Media";
} else if (wp.type == WindowManager.LayoutParams.TYPE_APPLICATION_MEDIA_OVERLAY) {
- title="MediaOvr";
+ title = "MediaOvr";
} else if (wp.type == WindowManager.LayoutParams.TYPE_APPLICATION_PANEL) {
- title="Panel";
+ title = "Panel";
} else if (wp.type == WindowManager.LayoutParams.TYPE_APPLICATION_SUB_PANEL) {
- title="SubPanel";
+ title = "SubPanel";
} else if (wp.type == WindowManager.LayoutParams.TYPE_APPLICATION_ABOVE_SUB_PANEL) {
- title="AboveSubPanel";
+ title = "AboveSubPanel";
} else if (wp.type == WindowManager.LayoutParams.TYPE_APPLICATION_ATTACHED_DIALOG) {
- title="AtchDlg";
+ title = "AtchDlg";
} else {
- title=Integer.toString(wp.type);
+ title = Integer.toString(wp.type);
}
if (mAppName != null) {
title += ":" + mAppName;
}
wp.setTitle(title);
}
+ } else if (wp.type >= WindowManager.LayoutParams.FIRST_SYSTEM_WINDOW &&
+ wp.type <= WindowManager.LayoutParams.LAST_SYSTEM_WINDOW) {
+ // We don't set the app token to this system window because the life cycles should be
+ // independent. If an app creates a system window and then the app goes to the stopped
+ // state, the system window should not be affected (can still show and receive input
+ // events).
+ if (curTitle == null || curTitle.length() == 0) {
+ String title = "Sys" + Integer.toString(wp.type);
+ if (mAppName != null) {
+ title += ":" + mAppName;
+ }
+ wp.setTitle(title);
+ }
} else {
if (wp.token == null) {
wp.token = mContainer == null ? mAppToken : mContainer.mAppToken;