Loading packages/SystemUI/src/com/android/systemui/recent/RecentsPanelView.java +2 −1 Original line number Diff line number Diff line Loading @@ -483,7 +483,8 @@ public class RecentsPanelView extends RelativeLayout } else { Intent intent = ad.intent; intent.addFlags(Intent.FLAG_ACTIVITY_LAUNCHED_FROM_HISTORY | Intent.FLAG_ACTIVITY_TASK_ON_HOME); | Intent.FLAG_ACTIVITY_TASK_ON_HOME | Intent.FLAG_ACTIVITY_NEW_TASK); if (DEBUG) Log.v(TAG, "Starting activity " + intent); context.startActivity(intent); } Loading policy/src/com/android/internal/policy/impl/PhoneWindowManager.java +12 −13 Original line number Diff line number Diff line Loading @@ -128,7 +128,6 @@ import static android.view.WindowManager.LayoutParams.TYPE_BOOT_PROGRESS; import android.view.WindowManagerImpl; import android.view.WindowManagerPolicy; import android.view.KeyCharacterMap.FallbackAction; import android.view.WindowManagerPolicy.WindowManagerFuncs; import android.view.accessibility.AccessibilityEvent; import android.view.animation.Animation; import android.view.animation.AnimationUtils; Loading Loading @@ -180,26 +179,26 @@ public class PhoneWindowManager implements WindowManagerPolicy { static final int PRIORITY_PHONE_LAYER = 7; // like the ANR / app crashed dialogs static final int SYSTEM_ALERT_LAYER = 8; // system-level error dialogs static final int SYSTEM_ERROR_LAYER = 9; // on-screen keyboards and other such input method user interfaces go here. static final int INPUT_METHOD_LAYER = 10; static final int INPUT_METHOD_LAYER = 9; // on-screen keyboards and other such input method user interfaces go here. static final int INPUT_METHOD_DIALOG_LAYER = 11; static final int INPUT_METHOD_DIALOG_LAYER = 10; // the keyguard; nothing on top of these can take focus, since they are // responsible for power management when displayed. static final int KEYGUARD_LAYER = 12; static final int KEYGUARD_DIALOG_LAYER = 13; static final int STATUS_BAR_SUB_PANEL_LAYER = 14; static final int STATUS_BAR_LAYER = 15; static final int STATUS_BAR_PANEL_LAYER = 16; static final int KEYGUARD_LAYER = 11; static final int KEYGUARD_DIALOG_LAYER = 12; static final int STATUS_BAR_SUB_PANEL_LAYER = 13; static final int STATUS_BAR_LAYER = 14; static final int STATUS_BAR_PANEL_LAYER = 15; // the on-screen volume indicator and controller shown when the user // changes the device volume static final int VOLUME_OVERLAY_LAYER = 17; static final int VOLUME_OVERLAY_LAYER = 16; // things in here CAN NOT take focus, but are shown on top of everything else. static final int SYSTEM_OVERLAY_LAYER = 18; static final int SYSTEM_OVERLAY_LAYER = 17; // the navigation bar, if available, shows atop most things static final int NAVIGATION_BAR_LAYER = 19; static final int NAVIGATION_BAR_LAYER = 18; // system-level error dialogs static final int SYSTEM_ERROR_LAYER = 19; // the drag layer: input for drag-and-drop is associated with this window, // which sits above all other focusable windows static final int DRAG_LAYER = 20; Loading services/java/com/android/server/am/ActivityManagerService.java +4 −2 Original line number Diff line number Diff line Loading @@ -3427,9 +3427,11 @@ public final class ActivityManagerService extends ActivityManagerNative ac.removePackage(name); } } if (mBooted) { mMainStack.resumeTopActivityLocked(null); mMainStack.scheduleIdleLocked(); } } return didSomething; } Loading services/java/com/android/server/am/AppErrorDialog.java +4 −0 Original line number Diff line number Diff line Loading @@ -24,6 +24,7 @@ import android.content.res.Resources; import android.os.Handler; import android.os.Message; import android.util.Slog; import android.view.WindowManager; class AppErrorDialog extends BaseErrorDialog { private final static String TAG = "AppErrorDialog"; Loading Loading @@ -73,6 +74,9 @@ class AppErrorDialog extends BaseErrorDialog { setTitle(res.getText(com.android.internal.R.string.aerr_title)); getWindow().addFlags(FLAG_SYSTEM_ERROR); getWindow().setTitle("Application Error: " + app.info.processName); if (app.persistent) { getWindow().setType(WindowManager.LayoutParams.TYPE_SYSTEM_ERROR); } // After the timeout, pretend the user clicked the quit button mHandler.sendMessageDelayed( Loading services/java/com/android/server/wm/WindowManagerService.java +56 −3 Original line number Diff line number Diff line Loading @@ -167,6 +167,7 @@ public class WindowManagerService extends IWindowManager.Stub static final boolean DEBUG_DRAG = false; static final boolean DEBUG_SCREEN_ON = false; static final boolean DEBUG_SCREENSHOT = false; static final boolean DEBUG_BOOT = false; static final boolean SHOW_SURFACE_ALLOC = false; static final boolean SHOW_TRANSACTIONS = false; static final boolean SHOW_LIGHT_TRANSACTIONS = false || SHOW_TRANSACTIONS; Loading Loading @@ -4728,6 +4729,14 @@ public class WindowManagerService extends IWindowManager.Stub public void enableScreenAfterBoot() { synchronized(mWindowMap) { if (DEBUG_BOOT) { RuntimeException here = new RuntimeException("here"); here.fillInStackTrace(); Slog.i(TAG, "enableScreenAfterBoot: mDisplayEnabled=" + mDisplayEnabled + " mForceDisplayEnabled=" + mForceDisplayEnabled + " mShowingBootMessages=" + mShowingBootMessages + " mSystemBooted=" + mSystemBooted, here); } if (mSystemBooted) { return; } Loading @@ -4745,6 +4754,14 @@ public class WindowManagerService extends IWindowManager.Stub } void enableScreenIfNeededLocked() { if (DEBUG_BOOT) { RuntimeException here = new RuntimeException("here"); here.fillInStackTrace(); Slog.i(TAG, "enableScreenIfNeededLocked: mDisplayEnabled=" + mDisplayEnabled + " mForceDisplayEnabled=" + mForceDisplayEnabled + " mShowingBootMessages=" + mShowingBootMessages + " mSystemBooted=" + mSystemBooted, here); } if (mDisplayEnabled) { return; } Loading @@ -4767,6 +4784,14 @@ public class WindowManagerService extends IWindowManager.Stub public void performEnableScreen() { synchronized(mWindowMap) { if (DEBUG_BOOT) { RuntimeException here = new RuntimeException("here"); here.fillInStackTrace(); Slog.i(TAG, "performEnableScreen: mDisplayEnabled=" + mDisplayEnabled + " mForceDisplayEnabled=" + mForceDisplayEnabled + " mShowingBootMessages=" + mShowingBootMessages + " mSystemBooted=" + mSystemBooted, here); } if (mDisplayEnabled) { return; } Loading @@ -4780,10 +4805,22 @@ public class WindowManagerService extends IWindowManager.Stub boolean haveBootMsg = false; boolean haveApp = false; boolean haveWallpaper = false; boolean haveKeyguard = false; boolean haveKeyguard = true; final int N = mWindows.size(); for (int i=0; i<N; i++) { WindowState w = mWindows.get(i); if (w.mAttrs.type == WindowManager.LayoutParams.TYPE_KEYGUARD) { // Only if there is a keyguard attached to the window manager // will we consider ourselves as having a keyguard. If it // isn't attached, we don't know if it wants to be shown or // hidden. If it is attached, we will say we have a keyguard // if the window doesn't want to be visible, because in that // case it explicitly doesn't want to be shown so we should // not delay turning the screen on for it. boolean vis = w.mViewVisibility == View.VISIBLE && w.mPolicyVisibility; haveKeyguard = !vis; } if (w.isVisibleLw() && !w.mObscured && !w.isDrawnLw()) { return; } Loading @@ -4800,7 +4837,7 @@ public class WindowManagerService extends IWindowManager.Stub } } if (DEBUG_SCREEN_ON) { if (DEBUG_SCREEN_ON || DEBUG_BOOT) { Slog.i(TAG, "******** booted=" + mSystemBooted + " msg=" + mShowingBootMessages + " haveBoot=" + haveBootMsg + " haveApp=" + haveApp + " haveWall=" + haveWallpaper + " haveKeyguard=" + haveKeyguard); Loading @@ -4821,7 +4858,7 @@ public class WindowManagerService extends IWindowManager.Stub } mDisplayEnabled = true; if (DEBUG_SCREEN_ON) Slog.i(TAG, "******************** ENABLING SCREEN!"); if (DEBUG_SCREEN_ON || DEBUG_BOOT) Slog.i(TAG, "******************** ENABLING SCREEN!"); if (false) { StringWriter sw = new StringWriter(); PrintWriter pw = new PrintWriter(sw); Loading Loading @@ -4852,6 +4889,14 @@ public class WindowManagerService extends IWindowManager.Stub public void showBootMessage(final CharSequence msg, final boolean always) { boolean first = false; synchronized(mWindowMap) { if (DEBUG_BOOT) { RuntimeException here = new RuntimeException("here"); here.fillInStackTrace(); Slog.i(TAG, "showBootMessage: msg=" + msg + " always=" + always + " mAllowBootMessages=" + mAllowBootMessages + " mShowingBootMessages=" + mShowingBootMessages + " mSystemBooted=" + mSystemBooted, here); } if (!mAllowBootMessages) { return; } Loading @@ -4873,6 +4918,14 @@ public class WindowManagerService extends IWindowManager.Stub } public void hideBootMessagesLocked() { if (DEBUG_BOOT) { RuntimeException here = new RuntimeException("here"); here.fillInStackTrace(); Slog.i(TAG, "hideBootMessagesLocked: mDisplayEnabled=" + mDisplayEnabled + " mForceDisplayEnabled=" + mForceDisplayEnabled + " mShowingBootMessages=" + mShowingBootMessages + " mSystemBooted=" + mSystemBooted, here); } if (mShowingBootMessages) { mShowingBootMessages = false; mPolicy.hideBootMessages(); Loading Loading
packages/SystemUI/src/com/android/systemui/recent/RecentsPanelView.java +2 −1 Original line number Diff line number Diff line Loading @@ -483,7 +483,8 @@ public class RecentsPanelView extends RelativeLayout } else { Intent intent = ad.intent; intent.addFlags(Intent.FLAG_ACTIVITY_LAUNCHED_FROM_HISTORY | Intent.FLAG_ACTIVITY_TASK_ON_HOME); | Intent.FLAG_ACTIVITY_TASK_ON_HOME | Intent.FLAG_ACTIVITY_NEW_TASK); if (DEBUG) Log.v(TAG, "Starting activity " + intent); context.startActivity(intent); } Loading
policy/src/com/android/internal/policy/impl/PhoneWindowManager.java +12 −13 Original line number Diff line number Diff line Loading @@ -128,7 +128,6 @@ import static android.view.WindowManager.LayoutParams.TYPE_BOOT_PROGRESS; import android.view.WindowManagerImpl; import android.view.WindowManagerPolicy; import android.view.KeyCharacterMap.FallbackAction; import android.view.WindowManagerPolicy.WindowManagerFuncs; import android.view.accessibility.AccessibilityEvent; import android.view.animation.Animation; import android.view.animation.AnimationUtils; Loading Loading @@ -180,26 +179,26 @@ public class PhoneWindowManager implements WindowManagerPolicy { static final int PRIORITY_PHONE_LAYER = 7; // like the ANR / app crashed dialogs static final int SYSTEM_ALERT_LAYER = 8; // system-level error dialogs static final int SYSTEM_ERROR_LAYER = 9; // on-screen keyboards and other such input method user interfaces go here. static final int INPUT_METHOD_LAYER = 10; static final int INPUT_METHOD_LAYER = 9; // on-screen keyboards and other such input method user interfaces go here. static final int INPUT_METHOD_DIALOG_LAYER = 11; static final int INPUT_METHOD_DIALOG_LAYER = 10; // the keyguard; nothing on top of these can take focus, since they are // responsible for power management when displayed. static final int KEYGUARD_LAYER = 12; static final int KEYGUARD_DIALOG_LAYER = 13; static final int STATUS_BAR_SUB_PANEL_LAYER = 14; static final int STATUS_BAR_LAYER = 15; static final int STATUS_BAR_PANEL_LAYER = 16; static final int KEYGUARD_LAYER = 11; static final int KEYGUARD_DIALOG_LAYER = 12; static final int STATUS_BAR_SUB_PANEL_LAYER = 13; static final int STATUS_BAR_LAYER = 14; static final int STATUS_BAR_PANEL_LAYER = 15; // the on-screen volume indicator and controller shown when the user // changes the device volume static final int VOLUME_OVERLAY_LAYER = 17; static final int VOLUME_OVERLAY_LAYER = 16; // things in here CAN NOT take focus, but are shown on top of everything else. static final int SYSTEM_OVERLAY_LAYER = 18; static final int SYSTEM_OVERLAY_LAYER = 17; // the navigation bar, if available, shows atop most things static final int NAVIGATION_BAR_LAYER = 19; static final int NAVIGATION_BAR_LAYER = 18; // system-level error dialogs static final int SYSTEM_ERROR_LAYER = 19; // the drag layer: input for drag-and-drop is associated with this window, // which sits above all other focusable windows static final int DRAG_LAYER = 20; Loading
services/java/com/android/server/am/ActivityManagerService.java +4 −2 Original line number Diff line number Diff line Loading @@ -3427,9 +3427,11 @@ public final class ActivityManagerService extends ActivityManagerNative ac.removePackage(name); } } if (mBooted) { mMainStack.resumeTopActivityLocked(null); mMainStack.scheduleIdleLocked(); } } return didSomething; } Loading
services/java/com/android/server/am/AppErrorDialog.java +4 −0 Original line number Diff line number Diff line Loading @@ -24,6 +24,7 @@ import android.content.res.Resources; import android.os.Handler; import android.os.Message; import android.util.Slog; import android.view.WindowManager; class AppErrorDialog extends BaseErrorDialog { private final static String TAG = "AppErrorDialog"; Loading Loading @@ -73,6 +74,9 @@ class AppErrorDialog extends BaseErrorDialog { setTitle(res.getText(com.android.internal.R.string.aerr_title)); getWindow().addFlags(FLAG_SYSTEM_ERROR); getWindow().setTitle("Application Error: " + app.info.processName); if (app.persistent) { getWindow().setType(WindowManager.LayoutParams.TYPE_SYSTEM_ERROR); } // After the timeout, pretend the user clicked the quit button mHandler.sendMessageDelayed( Loading
services/java/com/android/server/wm/WindowManagerService.java +56 −3 Original line number Diff line number Diff line Loading @@ -167,6 +167,7 @@ public class WindowManagerService extends IWindowManager.Stub static final boolean DEBUG_DRAG = false; static final boolean DEBUG_SCREEN_ON = false; static final boolean DEBUG_SCREENSHOT = false; static final boolean DEBUG_BOOT = false; static final boolean SHOW_SURFACE_ALLOC = false; static final boolean SHOW_TRANSACTIONS = false; static final boolean SHOW_LIGHT_TRANSACTIONS = false || SHOW_TRANSACTIONS; Loading Loading @@ -4728,6 +4729,14 @@ public class WindowManagerService extends IWindowManager.Stub public void enableScreenAfterBoot() { synchronized(mWindowMap) { if (DEBUG_BOOT) { RuntimeException here = new RuntimeException("here"); here.fillInStackTrace(); Slog.i(TAG, "enableScreenAfterBoot: mDisplayEnabled=" + mDisplayEnabled + " mForceDisplayEnabled=" + mForceDisplayEnabled + " mShowingBootMessages=" + mShowingBootMessages + " mSystemBooted=" + mSystemBooted, here); } if (mSystemBooted) { return; } Loading @@ -4745,6 +4754,14 @@ public class WindowManagerService extends IWindowManager.Stub } void enableScreenIfNeededLocked() { if (DEBUG_BOOT) { RuntimeException here = new RuntimeException("here"); here.fillInStackTrace(); Slog.i(TAG, "enableScreenIfNeededLocked: mDisplayEnabled=" + mDisplayEnabled + " mForceDisplayEnabled=" + mForceDisplayEnabled + " mShowingBootMessages=" + mShowingBootMessages + " mSystemBooted=" + mSystemBooted, here); } if (mDisplayEnabled) { return; } Loading @@ -4767,6 +4784,14 @@ public class WindowManagerService extends IWindowManager.Stub public void performEnableScreen() { synchronized(mWindowMap) { if (DEBUG_BOOT) { RuntimeException here = new RuntimeException("here"); here.fillInStackTrace(); Slog.i(TAG, "performEnableScreen: mDisplayEnabled=" + mDisplayEnabled + " mForceDisplayEnabled=" + mForceDisplayEnabled + " mShowingBootMessages=" + mShowingBootMessages + " mSystemBooted=" + mSystemBooted, here); } if (mDisplayEnabled) { return; } Loading @@ -4780,10 +4805,22 @@ public class WindowManagerService extends IWindowManager.Stub boolean haveBootMsg = false; boolean haveApp = false; boolean haveWallpaper = false; boolean haveKeyguard = false; boolean haveKeyguard = true; final int N = mWindows.size(); for (int i=0; i<N; i++) { WindowState w = mWindows.get(i); if (w.mAttrs.type == WindowManager.LayoutParams.TYPE_KEYGUARD) { // Only if there is a keyguard attached to the window manager // will we consider ourselves as having a keyguard. If it // isn't attached, we don't know if it wants to be shown or // hidden. If it is attached, we will say we have a keyguard // if the window doesn't want to be visible, because in that // case it explicitly doesn't want to be shown so we should // not delay turning the screen on for it. boolean vis = w.mViewVisibility == View.VISIBLE && w.mPolicyVisibility; haveKeyguard = !vis; } if (w.isVisibleLw() && !w.mObscured && !w.isDrawnLw()) { return; } Loading @@ -4800,7 +4837,7 @@ public class WindowManagerService extends IWindowManager.Stub } } if (DEBUG_SCREEN_ON) { if (DEBUG_SCREEN_ON || DEBUG_BOOT) { Slog.i(TAG, "******** booted=" + mSystemBooted + " msg=" + mShowingBootMessages + " haveBoot=" + haveBootMsg + " haveApp=" + haveApp + " haveWall=" + haveWallpaper + " haveKeyguard=" + haveKeyguard); Loading @@ -4821,7 +4858,7 @@ public class WindowManagerService extends IWindowManager.Stub } mDisplayEnabled = true; if (DEBUG_SCREEN_ON) Slog.i(TAG, "******************** ENABLING SCREEN!"); if (DEBUG_SCREEN_ON || DEBUG_BOOT) Slog.i(TAG, "******************** ENABLING SCREEN!"); if (false) { StringWriter sw = new StringWriter(); PrintWriter pw = new PrintWriter(sw); Loading Loading @@ -4852,6 +4889,14 @@ public class WindowManagerService extends IWindowManager.Stub public void showBootMessage(final CharSequence msg, final boolean always) { boolean first = false; synchronized(mWindowMap) { if (DEBUG_BOOT) { RuntimeException here = new RuntimeException("here"); here.fillInStackTrace(); Slog.i(TAG, "showBootMessage: msg=" + msg + " always=" + always + " mAllowBootMessages=" + mAllowBootMessages + " mShowingBootMessages=" + mShowingBootMessages + " mSystemBooted=" + mSystemBooted, here); } if (!mAllowBootMessages) { return; } Loading @@ -4873,6 +4918,14 @@ public class WindowManagerService extends IWindowManager.Stub } public void hideBootMessagesLocked() { if (DEBUG_BOOT) { RuntimeException here = new RuntimeException("here"); here.fillInStackTrace(); Slog.i(TAG, "hideBootMessagesLocked: mDisplayEnabled=" + mDisplayEnabled + " mForceDisplayEnabled=" + mForceDisplayEnabled + " mShowingBootMessages=" + mShowingBootMessages + " mSystemBooted=" + mSystemBooted, here); } if (mShowingBootMessages) { mShowingBootMessages = false; mPolicy.hideBootMessages(); Loading