diff options
| author | 2019-10-16 17:03:53 +0000 | |
|---|---|---|
| committer | 2019-10-16 17:03:53 +0000 | |
| commit | d429e710de741b7185bccc2f0dd09220dea7d7e1 (patch) | |
| tree | da152a7b834cbd70785b7dad33eb4e91c847277b | |
| parent | f3c1c427b2ba408ce0d214cd36f9f554c4ab65d6 (diff) | |
| parent | a596ca30303c6f11e9ed81ad8e9791add45af183 (diff) | |
Merge "Fixes more null pointer exceptions caused by ag/9382746"
| -rw-r--r-- | packages/SystemUI/src/com/android/systemui/assist/ui/DefaultUiController.java | 7 | ||||
| -rw-r--r-- | packages/SystemUI/src/com/android/systemui/statusbar/phone/NavigationBarView.java | 7 |
2 files changed, 10 insertions, 4 deletions
diff --git a/packages/SystemUI/src/com/android/systemui/assist/ui/DefaultUiController.java b/packages/SystemUI/src/com/android/systemui/assist/ui/DefaultUiController.java index 9958124a14e4..4cb1708468ea 100644 --- a/packages/SystemUI/src/com/android/systemui/assist/ui/DefaultUiController.java +++ b/packages/SystemUI/src/com/android/systemui/assist/ui/DefaultUiController.java @@ -164,8 +164,11 @@ public class DefaultUiController implements AssistManager.UiController { } private void updateAssistHandleVisibility() { - AssistHandleViewController controller = Dependency.get(NavigationBarController.class) - .getAssistHandlerViewController(); + NavigationBarController navigationBarController = + Dependency.get(NavigationBarController.class); + AssistHandleViewController controller = + navigationBarController == null + ? null : navigationBarController.getAssistHandlerViewController(); if (controller != null) { controller.setAssistHintBlocked(mInvocationInProgress); } diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/NavigationBarView.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/NavigationBarView.java index 9804f9ff4698..ae18833d99b5 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/NavigationBarView.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/NavigationBarView.java @@ -1212,8 +1212,11 @@ public class NavigationBarView extends FrameLayout implements setClipChildren(shouldClip); setClipToPadding(shouldClip); - AssistHandleViewController controller = Dependency.get(NavigationBarController.class) - .getAssistHandlerViewController(); + NavigationBarController navigationBarController = + Dependency.get(NavigationBarController.class); + AssistHandleViewController controller = + navigationBarController == null + ? null : navigationBarController.getAssistHandlerViewController(); if (controller != null) { controller.setBottomOffset(insets.getSystemWindowInsetBottom()); } |