commit | da8241334488ef567366cc00b098bbd0e8b84baf | [log] [tgz] |
---|---|---|
author | Lyn Han <lynhan@google.com> | Wed Mar 16 17:46:59 2022 +0000 |
committer | Android (Google) Code Review <android-gerrit@google.com> | Wed Mar 16 17:46:59 2022 +0000 |
tree | 7a2a379be13465ace7d3cb19a973a049e209684f | |
parent | 0d1d776e3a2bb2bb38ee0f86ccfe0028154bb340 [diff] | |
parent | 1e9d30430735362639b3e3a69ca7928ffa55fce1 [diff] |
Merge "Encapsulate background width updates to ActivatableNotificationView" into tm-dev
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/NotificationShelf.java b/packages/SystemUI/src/com/android/systemui/statusbar/NotificationShelf.java index 3dd717d..eaa66bb 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/NotificationShelf.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/NotificationShelf.java
@@ -226,10 +226,7 @@ ? MathUtils.lerp(shortestWidth, getWidth(), fractionToShade) : getWidth(); ActivatableNotificationView anv = (ActivatableNotificationView) this; - NotificationBackgroundView bg = anv.getBackgroundNormal(); - if (bg != null) { - anv.getBackgroundNormal().setActualWidth((int) actualWidth); - } + anv.setBackgroundWidth((int) actualWidth); if (mShelfIcons != null) { mShelfIcons.setActualLayoutWidth((int) actualWidth); }
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/notification/row/ActivatableNotificationView.java b/packages/SystemUI/src/com/android/systemui/statusbar/notification/row/ActivatableNotificationView.java index fca2aa1..577d536 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/notification/row/ActivatableNotificationView.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/notification/row/ActivatableNotificationView.java
@@ -163,10 +163,13 @@ } /** - * @return The background of this view. + * @param width The actual width to apply to the background view. */ - public NotificationBackgroundView getBackgroundNormal() { - return mBackgroundNormal; + public void setBackgroundWidth(int width) { + if (mBackgroundNormal == null) { + return; + } + mBackgroundNormal.setActualWidth(width); } @Override