Merge "Ensure the notif panel is inflated" into rvc-qpr-dev am: 434a416769
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/12673552 Change-Id: Ie491e8c126af216f7fe9289ab910c98486073515
This commit is contained in:
@@ -192,6 +192,12 @@ public class NotificationPanelViewController extends OverlayPanelViewController
|
|||||||
boolean isKeyboardVisible = (vis & InputMethodService.IME_VISIBLE) != 0;
|
boolean isKeyboardVisible = (vis & InputMethodService.IME_VISIBLE) != 0;
|
||||||
int bottomMargin = isKeyboardVisible ? 0 : mNavBarHeight;
|
int bottomMargin = isKeyboardVisible ? 0 : mNavBarHeight;
|
||||||
ViewGroup container = (ViewGroup) getLayout();
|
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 params =
|
||||||
(ViewGroup.MarginLayoutParams) container.getLayoutParams();
|
(ViewGroup.MarginLayoutParams) container.getLayoutParams();
|
||||||
params.setMargins(params.leftMargin, params.topMargin, params.rightMargin, bottomMargin);
|
params.setMargins(params.leftMargin, params.topMargin, params.rightMargin, bottomMargin);
|
||||||
|
|||||||
Reference in New Issue
Block a user