From f6d63f936b0bf18acfc2296943f71e07a66d59c4 Mon Sep 17 00:00:00 2001 From: Selim Cinek Date: Wed, 12 Jun 2019 10:00:47 -0700 Subject: [PATCH] Fixes a crash with KeyguardStatusView in tests Fixes: 135104079 Change-Id: Idb0b745e50d72ddf23e98582b6a93f1dd56ec9e7 --- .../src/com/android/keyguard/KeyguardStatusView.java | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/packages/SystemUI/src/com/android/keyguard/KeyguardStatusView.java b/packages/SystemUI/src/com/android/keyguard/KeyguardStatusView.java index 65c80e22b1e14..d3ef2382f6f10 100644 --- a/packages/SystemUI/src/com/android/keyguard/KeyguardStatusView.java +++ b/packages/SystemUI/src/com/android/keyguard/KeyguardStatusView.java @@ -414,10 +414,12 @@ public class KeyguardStatusView extends GridLayout implements int expanded = mOwnerInfo.getBottom() + mOwnerInfo.getPaddingBottom(); int toRemove = (int) ((expanded - collapsed) * ratio); setBottom(getMeasuredHeight() - toRemove); - // We're using scrolling in order not to overload the translation which is used - // when appearing the icons - mNotificationIcons.setScrollY(toRemove); - } else { + if (mNotificationIcons != null) { + // We're using scrolling in order not to overload the translation which is used + // when appearing the icons + mNotificationIcons.setScrollY(toRemove); + } + } else if (mNotificationIcons != null){ mNotificationIcons.setScrollY(0); } }