diff options
author | John Spurlock <jspurlock@google.com> | 2013-08-27 20:16:30 +0000 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2013-08-27 20:16:30 +0000 |
commit | 373bc2929260157e5695d29a01c9a19f8d1d5714 (patch) | |
tree | fa9b492ed8e8db9e0c3538552dc9d0dd7c5848ba | |
parent | f1c3f28eb9e87ddc6b5a3fdc5a3553b8134aff61 (diff) | |
parent | f6b639773c7462da26d3adac546fed1520ad81ad (diff) | |
download | frameworks_base-373bc2929260157e5695d29a01c9a19f8d1d5714.zip frameworks_base-373bc2929260157e5695d29a01c9a19f8d1d5714.tar.gz frameworks_base-373bc2929260157e5695d29a01c9a19f8d1d5714.tar.bz2 |
Merge "Fix NPE for devices w/out soft-nav." into klp-dev
-rw-r--r-- | packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBar.java | 27 |
1 files changed, 17 insertions, 10 deletions
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBar.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBar.java index d7475f3..faf0368 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBar.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBar.java @@ -668,7 +668,9 @@ public class PhoneStatusBar extends BaseStatusBar { @Override protected void updateSearchPanel() { super.updateSearchPanel(); - mNavigationBarView.setDelegateView(mSearchPanelView); + if (mNavigationBarView != null) { + mNavigationBarView.setDelegateView(mSearchPanelView); + } } @Override @@ -679,19 +681,23 @@ public class PhoneStatusBar extends BaseStatusBar { // we want to freeze the sysui state wherever it is mSearchPanelView.setSystemUiVisibility(mSystemUiVisibility); - WindowManager.LayoutParams lp = - (android.view.WindowManager.LayoutParams) mNavigationBarView.getLayoutParams(); - lp.flags &= ~WindowManager.LayoutParams.FLAG_NOT_TOUCH_MODAL; - mWindowManager.updateViewLayout(mNavigationBarView, lp); + if (mNavigationBarView != null) { + WindowManager.LayoutParams lp = + (android.view.WindowManager.LayoutParams) mNavigationBarView.getLayoutParams(); + lp.flags &= ~WindowManager.LayoutParams.FLAG_NOT_TOUCH_MODAL; + mWindowManager.updateViewLayout(mNavigationBarView, lp); + } } @Override public void hideSearchPanel() { super.hideSearchPanel(); - WindowManager.LayoutParams lp = - (android.view.WindowManager.LayoutParams) mNavigationBarView.getLayoutParams(); - lp.flags |= WindowManager.LayoutParams.FLAG_NOT_TOUCH_MODAL; - mWindowManager.updateViewLayout(mNavigationBarView, lp); + if (mNavigationBarView != null) { + WindowManager.LayoutParams lp = + (android.view.WindowManager.LayoutParams) mNavigationBarView.getLayoutParams(); + lp.flags |= WindowManager.LayoutParams.FLAG_NOT_TOUCH_MODAL; + mWindowManager.updateViewLayout(mNavigationBarView, lp); + } } protected int getStatusBarGravity() { @@ -1897,7 +1903,8 @@ public class PhoneStatusBar extends BaseStatusBar { mStatusBarWindowState); // update navigation bar mode - int nbMode = updateBarMode(oldVal, newVal, mNavigationBarView.getBarTransitions(), + int nbMode = mNavigationBarView == null ? -1 : updateBarMode( + oldVal, newVal, mNavigationBarView.getBarTransitions(), View.NAVIGATION_BAR_TRANSIENT, View.SYSTEM_UI_FLAG_TRANSPARENT_NAVIGATION, mNavigationBarWindowState); |