Fix NPE
Apparently, this can cause an NPE when there are multiple displays. Someone sent us review.git.corp.google.com/c/platform/frameworks/base/+/2296938 and the problem will reoccur if we don't fix it in that code's new location. Bug: 256539657 Test: presubmits Change-Id: I2c08bb5606bc8af7f3da0f3034c58b5d57b1be0f
This commit is contained in:
@@ -1290,8 +1290,10 @@ public class NavigationBar extends ViewController<NavigationBarView> implements
|
||||
}
|
||||
|
||||
private void onVerticalChanged(boolean isVertical) {
|
||||
mCentralSurfacesOptionalLazy.get().ifPresent(statusBar ->
|
||||
statusBar.getNotificationPanelViewController().setQsScrimEnabled(!isVertical));
|
||||
Optional<CentralSurfaces> cs = mCentralSurfacesOptionalLazy.get();
|
||||
if (cs.isPresent() && cs.get().getNotificationPanelViewController() != null) {
|
||||
cs.get().getNotificationPanelViewController().setQsScrimEnabled(!isVertical);
|
||||
}
|
||||
}
|
||||
|
||||
private boolean onNavigationTouch(View v, MotionEvent event) {
|
||||
|
||||
Reference in New Issue
Block a user