From 32c638a597dccbe4be600fd483060ee1466fdb04 Mon Sep 17 00:00:00 2001 From: Mady Mellor Date: Wed, 14 Sep 2016 08:58:25 -0700 Subject: [PATCH] Fix notification being slided over with the gear not showing If a notification is updated to be non-dismissable it gets "snapped back" into place, if the notification was slid over to show the gear when this happens it'll snap back to the gear. If the screen is turned off during this time, the notification tries to reset itself back over the gear. The translation animator was not cancelled in the reset method, so the gear visibility would get reset, but the translation animation to snap back into position would continue. This results in the notification being slid over but the gear being invisible. The fix is to simply cancel the animator when the translation is reset. Bug: 31437688 Change-Id: Icb9d777e30ee3a5578c49475b89f6d46c1096053 --- .../android/systemui/statusbar/ExpandableNotificationRow.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/ExpandableNotificationRow.java b/packages/SystemUI/src/com/android/systemui/statusbar/ExpandableNotificationRow.java index 02fdd3fc6424c..d40ee930ba1d6 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/ExpandableNotificationRow.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/ExpandableNotificationRow.java @@ -907,6 +907,9 @@ public class ExpandableNotificationRow extends ActivatableNotificationView { } public void resetTranslation() { + if (mTranslateAnim != null) { + mTranslateAnim.cancel(); + } if (mTranslateableViews != null) { for (int i = 0; i < mTranslateableViews.size(); i++) { mTranslateableViews.get(i).setTranslationX(0);