commit | 5a435bf08bd0fa667f58e9772a9fb0d3accd34ef | [log] [tgz] |
---|---|---|
author | Mike Digman <digman@google.com> | Wed Mar 21 16:32:56 2018 +0000 |
committer | android-build-merger <android-build-merger@google.com> | Wed Mar 21 16:32:56 2018 +0000 |
tree | 82f62ccaa40705d69efe8e6305f7baa364df5779 | |
parent | 10c82a1cd5c7d37fe62877372ecb90a4e6a39736 [diff] | |
parent | 65808f321055d1d1a73812002ef440e3724e8d20 [diff] |
Merge "Ensure rotate disable2 flag can be set on boot" into pi-dev am: 65808f3210 Change-Id: I094118c829df08c7dbd6db7a1bf38faedf013450
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 b493d7a..a39800d 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/NavigationBarFragment.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/NavigationBarFragment.java
@@ -464,7 +464,10 @@ private void onRotationSuggestionsDisabled() { // Immediately hide the rotate button and clear any planned removal setRotateSuggestionButtonState(false, true); - getView().removeCallbacks(mRemoveRotationProposal); + + // This method can be called before view setup is done, ensure getView isn't null + final View v = getView(); + if (v != null) v.removeCallbacks(mRemoveRotationProposal); } private void showAndLogRotationSuggestion() {