Merge "Fix NPE for devices w/out soft-nav." into klp-dev
This commit is contained in:
committed by
Android (Google) Code Review
commit
373bc29292
@@ -668,7 +668,9 @@ public class PhoneStatusBar extends BaseStatusBar {
|
|||||||
@Override
|
@Override
|
||||||
protected void updateSearchPanel() {
|
protected void updateSearchPanel() {
|
||||||
super.updateSearchPanel();
|
super.updateSearchPanel();
|
||||||
mNavigationBarView.setDelegateView(mSearchPanelView);
|
if (mNavigationBarView != null) {
|
||||||
|
mNavigationBarView.setDelegateView(mSearchPanelView);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -679,19 +681,23 @@ public class PhoneStatusBar extends BaseStatusBar {
|
|||||||
// we want to freeze the sysui state wherever it is
|
// we want to freeze the sysui state wherever it is
|
||||||
mSearchPanelView.setSystemUiVisibility(mSystemUiVisibility);
|
mSearchPanelView.setSystemUiVisibility(mSystemUiVisibility);
|
||||||
|
|
||||||
WindowManager.LayoutParams lp =
|
if (mNavigationBarView != null) {
|
||||||
(android.view.WindowManager.LayoutParams) mNavigationBarView.getLayoutParams();
|
WindowManager.LayoutParams lp =
|
||||||
lp.flags &= ~WindowManager.LayoutParams.FLAG_NOT_TOUCH_MODAL;
|
(android.view.WindowManager.LayoutParams) mNavigationBarView.getLayoutParams();
|
||||||
mWindowManager.updateViewLayout(mNavigationBarView, lp);
|
lp.flags &= ~WindowManager.LayoutParams.FLAG_NOT_TOUCH_MODAL;
|
||||||
|
mWindowManager.updateViewLayout(mNavigationBarView, lp);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void hideSearchPanel() {
|
public void hideSearchPanel() {
|
||||||
super.hideSearchPanel();
|
super.hideSearchPanel();
|
||||||
WindowManager.LayoutParams lp =
|
if (mNavigationBarView != null) {
|
||||||
(android.view.WindowManager.LayoutParams) mNavigationBarView.getLayoutParams();
|
WindowManager.LayoutParams lp =
|
||||||
lp.flags |= WindowManager.LayoutParams.FLAG_NOT_TOUCH_MODAL;
|
(android.view.WindowManager.LayoutParams) mNavigationBarView.getLayoutParams();
|
||||||
mWindowManager.updateViewLayout(mNavigationBarView, lp);
|
lp.flags |= WindowManager.LayoutParams.FLAG_NOT_TOUCH_MODAL;
|
||||||
|
mWindowManager.updateViewLayout(mNavigationBarView, lp);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
protected int getStatusBarGravity() {
|
protected int getStatusBarGravity() {
|
||||||
@@ -1897,7 +1903,8 @@ public class PhoneStatusBar extends BaseStatusBar {
|
|||||||
mStatusBarWindowState);
|
mStatusBarWindowState);
|
||||||
|
|
||||||
// update navigation bar mode
|
// 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,
|
View.NAVIGATION_BAR_TRANSIENT, View.SYSTEM_UI_FLAG_TRANSPARENT_NAVIGATION,
|
||||||
mNavigationBarWindowState);
|
mNavigationBarWindowState);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user