am be655510: Merge "Disassociate system windows from apps" into mnc-dr-dev
* commit 'be6555105a9325d0b7073c08a0bd4dc0b5ce1fb3': Disassociate system windows from apps
This commit is contained in:
@@ -588,25 +588,38 @@ public abstract class Window {
|
|||||||
if (curTitle == null || curTitle.length() == 0) {
|
if (curTitle == null || curTitle.length() == 0) {
|
||||||
String title;
|
String title;
|
||||||
if (wp.type == WindowManager.LayoutParams.TYPE_APPLICATION_MEDIA) {
|
if (wp.type == WindowManager.LayoutParams.TYPE_APPLICATION_MEDIA) {
|
||||||
title="Media";
|
title = "Media";
|
||||||
} else if (wp.type == WindowManager.LayoutParams.TYPE_APPLICATION_MEDIA_OVERLAY) {
|
} else if (wp.type == WindowManager.LayoutParams.TYPE_APPLICATION_MEDIA_OVERLAY) {
|
||||||
title="MediaOvr";
|
title = "MediaOvr";
|
||||||
} else if (wp.type == WindowManager.LayoutParams.TYPE_APPLICATION_PANEL) {
|
} else if (wp.type == WindowManager.LayoutParams.TYPE_APPLICATION_PANEL) {
|
||||||
title="Panel";
|
title = "Panel";
|
||||||
} else if (wp.type == WindowManager.LayoutParams.TYPE_APPLICATION_SUB_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) {
|
} 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) {
|
} else if (wp.type == WindowManager.LayoutParams.TYPE_APPLICATION_ATTACHED_DIALOG) {
|
||||||
title="AtchDlg";
|
title = "AtchDlg";
|
||||||
} else {
|
} else {
|
||||||
title=Integer.toString(wp.type);
|
title = Integer.toString(wp.type);
|
||||||
}
|
}
|
||||||
if (mAppName != null) {
|
if (mAppName != null) {
|
||||||
title += ":" + mAppName;
|
title += ":" + mAppName;
|
||||||
}
|
}
|
||||||
wp.setTitle(title);
|
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 {
|
} else {
|
||||||
if (wp.token == null) {
|
if (wp.token == null) {
|
||||||
wp.token = mContainer == null ? mAppToken : mContainer.mAppToken;
|
wp.token = mContainer == null ? mAppToken : mContainer.mAppToken;
|
||||||
|
|||||||
Reference in New Issue
Block a user