From 1a5d8eadd56b435843dfbc1adf3779aa7286081b Mon Sep 17 00:00:00 2001 From: Mady Mellor Date: Thu, 9 Jun 2016 10:42:42 -0700 Subject: [PATCH] Fixes issue with group backgrounds when animating to keyguard The backgrounds weren't being updated before the collapse animation when going to the keyguard so it would look very bad when they collapsed. This moves updating the background into setChildrenExpanded which will cover updating the background for both the tapping to expand case as well as the animating to the keyguard case. Change-Id: Icba2fa895498d307a38bd9f65be06265afd21a1a Fixes: 29240532 --- .../android/systemui/statusbar/ExpandableNotificationRow.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/ExpandableNotificationRow.java b/packages/SystemUI/src/com/android/systemui/statusbar/ExpandableNotificationRow.java index aedc7df0ebc3e..9f50d54049384 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/ExpandableNotificationRow.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/ExpandableNotificationRow.java @@ -140,11 +140,10 @@ public class ExpandableNotificationRow extends ActivatableNotificationView { @Override public void onClick(View v) { if (!mShowingPublic && mGroupManager.isSummaryOfGroup(mStatusBarNotification)) { + mGroupExpansionChanging = true; final boolean wasExpanded = mGroupManager.isGroupExpanded(mStatusBarNotification); boolean nowExpanded = mGroupManager.toggleGroupExpansion(mStatusBarNotification); mOnExpandClickListener.onExpandClicked(mEntry, nowExpanded); - mGroupExpansionChanging = true; - updateBackgroundForGroupState(); MetricsLogger.action(mContext, MetricsEvent.ACTION_NOTIFICATION_GROUP_EXPANDER, nowExpanded); logExpansionEvent(true /* userAction */, wasExpanded); @@ -1336,6 +1335,7 @@ public class ExpandableNotificationRow extends ActivatableNotificationView { if (mChildrenContainer != null) { mChildrenContainer.setChildrenExpanded(expanded); } + updateBackgroundForGroupState(); updateClickAndFocus(); }