Null check on NavigationBarView in NavigationBarFragment
While sysui is starting, it's possible to get disable callbacks before
the NavigationBarView has had a chance to get created. In this case just
don't pass the message, similar to Disable1 callbacks
Change-Id: Ic89ca281579ff9720c356f79102d1b576670740a
Fixes: 118357487
Test: no exceptions during system boot after wiping
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/NavigationBarFragment.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/NavigationBarFragment.java
index 6edde07..59c15f1 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/NavigationBarFragment.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/NavigationBarFragment.java
@@ -478,7 +478,9 @@
private void setDisabled2Flags(int state2) {
// Method only called on change of disable2 flags
- mNavigationBarView.getRotateSuggestionButton().onDisable2FlagChanged(state2);
+ if (mNavigationBarView != null) {
+ mNavigationBarView.getRotateSuggestionButton().onDisable2FlagChanged(state2);
+ }
}
// ----- Internal stuffz -----