OSDN Git Service

Solved notification overlay issue once and for all
authorSelim Cinek <cinek@google.com>
Wed, 12 Nov 2014 15:58:16 +0000 (16:58 +0100)
committerSelim Cinek <cinek@google.com>
Wed, 12 Nov 2014 16:02:04 +0000 (17:02 +0100)
But...
Once and for all!

Bug: 18314177
Change-Id: I484bea7d9f183d749fcdfba899d40292245f353d

packages/SystemUI/src/com/android/systemui/statusbar/stack/NotificationStackScrollLayout.java
packages/SystemUI/src/com/android/systemui/statusbar/stack/StackStateAnimator.java

index d543cff..617161f 100644 (file)
@@ -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();
         }
     }
 
index 674642b..a56440c 100644 (file)
@@ -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);
         }