summaryrefslogtreecommitdiffstats
path: root/packages/SystemUI/src/com/android/systemui/statusbar/policy/NotificationRowLayout.java
diff options
context:
space:
mode:
Diffstat (limited to 'packages/SystemUI/src/com/android/systemui/statusbar/policy/NotificationRowLayout.java')
-rw-r--r--packages/SystemUI/src/com/android/systemui/statusbar/policy/NotificationRowLayout.java16
1 files changed, 12 insertions, 4 deletions
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/policy/NotificationRowLayout.java b/packages/SystemUI/src/com/android/systemui/statusbar/policy/NotificationRowLayout.java
index 9e9dec2..2aa0f5e 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/policy/NotificationRowLayout.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/policy/NotificationRowLayout.java
@@ -61,7 +61,8 @@ public class NotificationRowLayout
HashMap<View, ValueAnimator> mDisappearingViews = new HashMap<View, ValueAnimator>();
private SwipeHelper mSwipeHelper;
-
+ private HashMap<View, Runnable> mDismissRunnables = new HashMap<View, Runnable>();
+
private OnSizeChangedListener mOnSizeChangedListener;
// Flag set during notification removal animation to avoid causing too much work until
@@ -111,6 +112,10 @@ public class NotificationRowLayout
mOnSizeChangedListener = l;
}
+ public void runOnDismiss(View child, Runnable runnable) {
+ mDismissRunnables.put(child, runnable);
+ }
+
@Override
public void onWindowFocusChanged(boolean hasWindowFocus) {
super.onWindowFocusChanged(hasWindowFocus);
@@ -166,14 +171,17 @@ public class NotificationRowLayout
return NotificationData.setUserLocked(v, userLocked);
}
- public void onChildDismissed(View v, boolean fromUser) {
+ public void onChildDismissed(View v) {
if (DEBUG) Slog.v(TAG, "onChildDismissed: " + v + " mRemoveViews=" + mRemoveViews);
final View veto = v.findViewById(R.id.veto);
if (veto != null && veto.getVisibility() != View.GONE && mRemoveViews) {
veto.performClick();
}
- if (fromUser) {
- NotificationData.setUserCleared(v);
+ NotificationData.setUserDismissed(v);
+
+ Runnable dismissRunnable = mDismissRunnables.remove(v);
+ if (dismissRunnable != null) {
+ dismissRunnable.run();
}
}