From 3cab6b0f1deff1ee4b4b2e048935f2201d2cbc0d Mon Sep 17 00:00:00 2001 From: Robert Greenwalt Date: Thu, 4 Oct 2012 16:44:26 -0700 Subject: [PATCH] Properly cancel Tether notification. When we add a second type of tethering we unify the notifications into a single generic type. This is done by canceling the first and replacing it, but this flow was improperly canceling, so you could end up with orphaned tethering icons. bug:7283605 Change-Id: I1d136f51592b4326d48578cf67b69122e45d4984 --- services/java/com/android/server/connectivity/Tethering.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/services/java/com/android/server/connectivity/Tethering.java b/services/java/com/android/server/connectivity/Tethering.java index b38d617b5d26d..e4a7ead471714 100644 --- a/services/java/com/android/server/connectivity/Tethering.java +++ b/services/java/com/android/server/connectivity/Tethering.java @@ -454,7 +454,8 @@ public class Tethering extends INetworkManagementEventObserver.Stub { if (mTetheredNotification.icon == icon) { return; } - notificationManager.cancel(mTetheredNotification.icon); + notificationManager.cancelAsUser(null, mTetheredNotification.icon, + UserHandle.ALL); } Intent intent = new Intent();