From e3b642ea4d2a52fd244396a0b7eaa437abe8b004 Mon Sep 17 00:00:00 2001 From: John Spurlock Date: Thu, 9 May 2013 15:51:32 -0400 Subject: Handle missing status/nav bar case inside hideybar check. Don't assume mNavigationBar != null. Bug: 8890313 Change-Id: If2745b32a8502df629199edbf5493fe8d197a7d3 --- .../src/com/android/internal/policy/impl/PhoneWindowManager.java | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'policy') diff --git a/policy/src/com/android/internal/policy/impl/PhoneWindowManager.java b/policy/src/com/android/internal/policy/impl/PhoneWindowManager.java index c81f863..08fb48f 100644 --- a/policy/src/com/android/internal/policy/impl/PhoneWindowManager.java +++ b/policy/src/com/android/internal/policy/impl/PhoneWindowManager.java @@ -2526,7 +2526,7 @@ public class PhoneWindowManager implements WindowManagerPolicy { mStatusHideybar = HIDEYBAR_HIDING; mStatusBar.hideLw(true); } - if (mNavigationHideybar == HIDEYBAR_SHOWING && + if (mNavigationBar != null && mNavigationHideybar == HIDEYBAR_SHOWING && 0 == (visibility & View.NAVIGATION_BAR_OVERLAY)) { mNavigationHideybar = HIDEYBAR_HIDING; mNavigationBar.hideLw(true); @@ -4163,6 +4163,9 @@ public class PhoneWindowManager implements WindowManagerPolicy { if (hideybar == HIDEYBAR_SHOWING) { if (DEBUG) Slog.d(TAG, "Not showing " + tag + " hideybar, already shown"); return false; + } else if (win == null) { + if (DEBUG) Slog.d(TAG, "Not showing " + tag + " hideybar, bar doesn't exist"); + return false; } else if (win.isDisplayedLw()) { if (DEBUG) Slog.d(TAG, "Not showing " + tag + " hideybar, bar already visible"); return false; @@ -5076,7 +5079,7 @@ public class PhoneWindowManager implements WindowManagerPolicy { boolean hideNavigationBarSysui = (tmpVisibility & View.SYSTEM_UI_FLAG_HIDE_NAVIGATION) != 0; boolean navigationHideyAllowed = - hideNavigationBarSysui && overlayAllowed; + hideNavigationBarSysui && overlayAllowed && mNavigationBar != null; if (!navigationHideyAllowed) { mNavigationHideybar = HIDEYBAR_NONE; } else { -- cgit v1.1