Removing notifications always immediately when swiping them away
am: 5e018206e2
Change-Id: I09f3b3a2f793b10b7c9c39e96b26a89992a1314a
This commit is contained in:
@@ -983,12 +983,12 @@ public abstract class BaseStatusBar extends SystemUI implements
|
|||||||
// Accessibility feedback
|
// Accessibility feedback
|
||||||
v.announceForAccessibility(
|
v.announceForAccessibility(
|
||||||
mContext.getString(R.string.accessibility_notification_dismissed));
|
mContext.getString(R.string.accessibility_notification_dismissed));
|
||||||
performRemoveNotification(row.getStatusBarNotification(), false /* removeView */);
|
performRemoveNotification(row.getStatusBarNotification());
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
protected void performRemoveNotification(StatusBarNotification n, boolean removeView) {
|
protected void performRemoveNotification(StatusBarNotification n) {
|
||||||
final String pkg = n.getPackageName();
|
final String pkg = n.getPackageName();
|
||||||
final String tag = n.getTag();
|
final String tag = n.getTag();
|
||||||
final int id = n.getId();
|
final int id = n.getId();
|
||||||
@@ -998,14 +998,8 @@ public abstract class BaseStatusBar extends SystemUI implements
|
|||||||
if (FORCE_REMOTE_INPUT_HISTORY
|
if (FORCE_REMOTE_INPUT_HISTORY
|
||||||
&& mKeysKeptForRemoteInput.contains(n.getKey())) {
|
&& mKeysKeptForRemoteInput.contains(n.getKey())) {
|
||||||
mKeysKeptForRemoteInput.remove(n.getKey());
|
mKeysKeptForRemoteInput.remove(n.getKey());
|
||||||
removeView = true;
|
|
||||||
}
|
|
||||||
if (mRemoteInputEntriesToRemoveOnCollapse.remove(mNotificationData.get(n.getKey()))) {
|
|
||||||
removeView = true;
|
|
||||||
}
|
|
||||||
if (removeView) {
|
|
||||||
removeNotification(n.getKey(), null);
|
|
||||||
}
|
}
|
||||||
|
removeNotification(n.getKey(), null);
|
||||||
|
|
||||||
} catch (RemoteException ex) {
|
} catch (RemoteException ex) {
|
||||||
// system process is dead if we're here.
|
// system process is dead if we're here.
|
||||||
@@ -2004,8 +1998,7 @@ public abstract class BaseStatusBar extends SystemUI implements
|
|||||||
Runnable removeRunnable = new Runnable() {
|
Runnable removeRunnable = new Runnable() {
|
||||||
@Override
|
@Override
|
||||||
public void run() {
|
public void run() {
|
||||||
performRemoveNotification(parentToCancelFinal,
|
performRemoveNotification(parentToCancelFinal);
|
||||||
true);
|
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
if (isCollapsing()) {
|
if (isCollapsing()) {
|
||||||
|
|||||||
@@ -1699,12 +1699,12 @@ public class PhoneStatusBar extends BaseStatusBar implements DemoMode,
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void performRemoveNotification(StatusBarNotification n, boolean removeView) {
|
protected void performRemoveNotification(StatusBarNotification n) {
|
||||||
Entry entry = mNotificationData.get(n.getKey());
|
Entry entry = mNotificationData.get(n.getKey());
|
||||||
if (mRemoteInputController.isRemoteInputActive(entry)) {
|
if (mRemoteInputController.isRemoteInputActive(entry)) {
|
||||||
mRemoteInputController.removeRemoteInput(entry, null);
|
mRemoteInputController.removeRemoteInput(entry, null);
|
||||||
}
|
}
|
||||||
super.performRemoveNotification(n, removeView);
|
super.performRemoveNotification(n);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
Reference in New Issue
Block a user