Loading policy/src/com/android/internal/policy/impl/PhoneWindowManager.java +17 −2 Original line number Diff line number Diff line Loading @@ -278,6 +278,7 @@ public class PhoneWindowManager implements WindowManagerPolicy { boolean mSafeMode; WindowState mStatusBar = null; WindowState mHeadsUp = null; int mStatusBarHeight; WindowState mNavigationBar = null; boolean mHasNavigationBar = false; Loading Loading @@ -1996,6 +1997,13 @@ public class PhoneWindowManager implements WindowManagerPolicy { mContext.enforceCallingOrSelfPermission( android.Manifest.permission.STATUS_BAR_SERVICE, "PhoneWindowManager"); if (mHeadsUp != null) { if (mHeadsUp.isAlive()) { return WindowManagerGlobal.ADD_MULTIPLE_SINGLETON; } } mHeadsUp = win; if (DEBUG) Slog.i(TAG, "HeadsUp Notification: " + mHeadsUp); break; case TYPE_STATUS_BAR_SUB_PANEL: mContext.enforceCallingOrSelfPermission( Loading Loading @@ -2026,6 +2034,9 @@ public class PhoneWindowManager implements WindowManagerPolicy { } if (mNavigationBar == win) { mNavigationBar = null; mNavigationBarController.setWindow(null); } if (mHeadsUp == win) { if (DEBUG) Slog.i(TAG, "Removing HeadsUp notfication: " + mHeadsUp); mHeadsUp = null; } } Loading Loading @@ -3066,12 +3077,16 @@ public class PhoneWindowManager implements WindowManagerPolicy { if (!isKeyguardShowing) { navTranslucent &= areTranslucentBarsAllowed(); } boolean headsUpVisible = false; // needed for the case when HeadsUpNotification is displayed. if(mHeadsUp != null ) headsUpVisible = mHeadsUp.isVisibleLw(); // When the navigation bar isn't visible, we put up a fake // input window to catch all touch events. This way we can // detect when the user presses anywhere to bring back the nav // bar and ensure the application doesn't see the event. if (navVisible || navAllowedHidden) { // Fake window should not be displayed when HeadsUpNotificationView // in the form of HighPriority notifications are displayed if (navVisible || navAllowedHidden || headsUpVisible) { if (mHideNavFakeWindow != null) { mHideNavFakeWindow.dismiss(); mHideNavFakeWindow = null; Loading Loading
policy/src/com/android/internal/policy/impl/PhoneWindowManager.java +17 −2 Original line number Diff line number Diff line Loading @@ -278,6 +278,7 @@ public class PhoneWindowManager implements WindowManagerPolicy { boolean mSafeMode; WindowState mStatusBar = null; WindowState mHeadsUp = null; int mStatusBarHeight; WindowState mNavigationBar = null; boolean mHasNavigationBar = false; Loading Loading @@ -1996,6 +1997,13 @@ public class PhoneWindowManager implements WindowManagerPolicy { mContext.enforceCallingOrSelfPermission( android.Manifest.permission.STATUS_BAR_SERVICE, "PhoneWindowManager"); if (mHeadsUp != null) { if (mHeadsUp.isAlive()) { return WindowManagerGlobal.ADD_MULTIPLE_SINGLETON; } } mHeadsUp = win; if (DEBUG) Slog.i(TAG, "HeadsUp Notification: " + mHeadsUp); break; case TYPE_STATUS_BAR_SUB_PANEL: mContext.enforceCallingOrSelfPermission( Loading Loading @@ -2026,6 +2034,9 @@ public class PhoneWindowManager implements WindowManagerPolicy { } if (mNavigationBar == win) { mNavigationBar = null; mNavigationBarController.setWindow(null); } if (mHeadsUp == win) { if (DEBUG) Slog.i(TAG, "Removing HeadsUp notfication: " + mHeadsUp); mHeadsUp = null; } } Loading Loading @@ -3066,12 +3077,16 @@ public class PhoneWindowManager implements WindowManagerPolicy { if (!isKeyguardShowing) { navTranslucent &= areTranslucentBarsAllowed(); } boolean headsUpVisible = false; // needed for the case when HeadsUpNotification is displayed. if(mHeadsUp != null ) headsUpVisible = mHeadsUp.isVisibleLw(); // When the navigation bar isn't visible, we put up a fake // input window to catch all touch events. This way we can // detect when the user presses anywhere to bring back the nav // bar and ensure the application doesn't see the event. if (navVisible || navAllowedHidden) { // Fake window should not be displayed when HeadsUpNotificationView // in the form of HighPriority notifications are displayed if (navVisible || navAllowedHidden || headsUpVisible) { if (mHideNavFakeWindow != null) { mHideNavFakeWindow.dismiss(); mHideNavFakeWindow = null; Loading