summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBenjamin Legrand <android@legrand.ws>2016-01-14 21:09:19 +0100
committerEthan Chen <intervigil@gmail.com>2016-01-28 11:09:35 -0800
commit1150754dddd1c7f2c4a75a07e047c1d14f471f1f (patch)
tree02016c8628c25f5fd35711ba96974883c99cdcb1
parent1ab548f54db4d728545e0f1762969809a58a27c5 (diff)
downloadframeworks_base-1150754dddd1c7f2c4a75a07e047c1d14f471f1f.zip
frameworks_base-1150754dddd1c7f2c4a75a07e047c1d14f471f1f.tar.gz
frameworks_base-1150754dddd1c7f2c4a75a07e047c1d14f471f1f.tar.bz2
Tethering: Fix number of device connected
The following commit prevents notification from being shown again when notification is the same as previous one. db3fe9edd4cb638d3dd20b23456f6cdb0a414ed1 Fix Tethering Notifications for multiple ifaces This is true except for the Wifi tethering which can have multiple connections. Patch taken from cm12.1 code. Change-Id: Ic30c6d3498595e2ba0561c709789fd6db1113f69
-rw-r--r--services/core/java/com/android/server/connectivity/Tethering.java7
1 files changed, 6 insertions, 1 deletions
diff --git a/services/core/java/com/android/server/connectivity/Tethering.java b/services/core/java/com/android/server/connectivity/Tethering.java
index 9ead529..38712ba 100644
--- a/services/core/java/com/android/server/connectivity/Tethering.java
+++ b/services/core/java/com/android/server/connectivity/Tethering.java
@@ -650,7 +650,12 @@ public class Tethering extends BaseNetworkObserver {
if (mLastNotificationId != 0) {
if (mLastNotificationId == icon) {
- return;
+ if (!mContext.getResources().getBoolean(
+ com.android.internal.R.bool.config_softap_extention)
+ || icon != com.android.internal.R.drawable.stat_sys_tether_wifi) {
+ // if softap extension feature is on, allow to update icon else return.
+ return;
+ }
}
notificationManager.cancelAsUser(null, mLastNotificationId,
UserHandle.ALL);