Skip to content

Commit 3cab6b0

Browse files
author
Robert Greenwalt
committed
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
1 parent dce8b94 commit 3cab6b0

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

services/java/com/android/server/connectivity/Tethering.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -454,7 +454,8 @@ private void showTetheredNotification(int icon) {
454454
if (mTetheredNotification.icon == icon) {
455455
return;
456456
}
457-
notificationManager.cancel(mTetheredNotification.icon);
457+
notificationManager.cancelAsUser(null, mTetheredNotification.icon,
458+
UserHandle.ALL);
458459
}
459460

460461
Intent intent = new Intent();

0 commit comments

Comments
 (0)