Fix Tethering Notifications for multiple ifaces
Used to see multiple notifications if usb tethering and wifi tethering were both used.
bug:2527862
Change-Id: Idc6299c0a70564dd7c8d8d7fe13bde83723134ae
diff --git a/services/java/com/android/server/connectivity/Tethering.java b/services/java/com/android/server/connectivity/Tethering.java
index fcb39c9..d57457eb 100644
--- a/services/java/com/android/server/connectivity/Tethering.java
+++ b/services/java/com/android/server/connectivity/Tethering.java
@@ -365,6 +365,13 @@
return;
}
+ if (mTetheredNotification != null) {
+ if (mTetheredNotification.icon == icon) {
+ return;
+ }
+ notificationManager.cancel(mTetheredNotification.icon);
+ }
+
Intent intent = new Intent();
intent.setClassName("com.android.settings", "com.android.settings.TetherSettings");
intent.setFlags(Intent.FLAG_ACTIVITY_NO_HISTORY);