From f336f4c13ad3be15e2b44266cd786685975425f2 Mon Sep 17 00:00:00 2001 From: Selim Cinek Date: Wed, 12 Nov 2014 16:58:16 +0100 Subject: [PATCH] Solved notification overlay issue once and for all But... Once and for all! Bug: 18314177 Change-Id: I484bea7d9f183d749fcdfba899d40292245f353d --- .../systemui/statusbar/stack/NotificationStackScrollLayout.java | 3 +++ .../src/com/android/systemui/statusbar/stack/StackStateAnimator.java | 5 +++++ 2 files changed, 8 insertions(+) diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/stack/NotificationStackScrollLayout.java b/packages/SystemUI/src/com/android/systemui/statusbar/stack/NotificationStackScrollLayout.java index d543cff17805..617161f04646 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/stack/NotificationStackScrollLayout.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/stack/NotificationStackScrollLayout.java @@ -2002,6 +2002,9 @@ public class NotificationStackScrollLayout extends ViewGroup mStackScrollAlgorithm.onExpansionStopped(); if (!mIsExpanded) { mOwnScrollY = 0; + + // lets make sure nothing is in the overlay anymore + getOverlay().clear(); } } diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/stack/StackStateAnimator.java b/packages/SystemUI/src/com/android/systemui/statusbar/stack/StackStateAnimator.java index 674642b3c437..a56440ce31de 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/stack/StackStateAnimator.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/stack/StackStateAnimator.java @@ -794,6 +794,11 @@ public class StackStateAnimator { mHostLayout.getOverlay().remove(changingView); } }); + } else if (event.animationType == + NotificationStackScrollLayout.AnimationEvent.ANIMATION_TYPE_REMOVE_SWIPED_OUT) { + // A race condition can trigger the view to be added to the overlay even though + // it is swiped out. So let's remove it + mHostLayout.getOverlay().remove(changingView); } mNewEvents.add(event); } -- 2.11.0