diff options
Diffstat (limited to 'packages/CarSystemUI/src')
-rw-r--r-- | packages/CarSystemUI/src/com/android/systemui/car/notification/NotificationPanelViewController.java | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/packages/CarSystemUI/src/com/android/systemui/car/notification/NotificationPanelViewController.java b/packages/CarSystemUI/src/com/android/systemui/car/notification/NotificationPanelViewController.java index 65de46d36dd0..fd804c71c9d0 100644 --- a/packages/CarSystemUI/src/com/android/systemui/car/notification/NotificationPanelViewController.java +++ b/packages/CarSystemUI/src/com/android/systemui/car/notification/NotificationPanelViewController.java @@ -192,6 +192,12 @@ public class NotificationPanelViewController extends OverlayPanelViewController boolean isKeyboardVisible = (vis & InputMethodService.IME_VISIBLE) != 0; int bottomMargin = isKeyboardVisible ? 0 : mNavBarHeight; ViewGroup container = (ViewGroup) getLayout(); + if (container == null) { + // Notification panel hasn't been inflated before. We shouldn't try to update the layout + // params. + return; + } + ViewGroup.MarginLayoutParams params = (ViewGroup.MarginLayoutParams) container.getLayoutParams(); params.setMargins(params.leftMargin, params.topMargin, params.rightMargin, bottomMargin); |