Loading core/java/android/net/NetworkTemplate.java +3 −1 Original line number Diff line number Diff line Loading @@ -22,6 +22,7 @@ import static android.net.ConnectivityManager.TYPE_WIFI_P2P; import static android.net.ConnectivityManager.TYPE_WIMAX; import static android.net.NetworkIdentity.COMBINE_SUBTYPE_ENABLED; import static android.net.NetworkIdentity.scrubSubscriberId; import static android.net.wifi.WifiInfo.removeDoubleQuotes; import static android.telephony.TelephonyManager.NETWORK_CLASS_2_G; import static android.telephony.TelephonyManager.NETWORK_CLASS_3_G; import static android.telephony.TelephonyManager.NETWORK_CLASS_4_G; Loading Loading @@ -279,7 +280,8 @@ public class NetworkTemplate implements Parcelable { private boolean matchesWifi(NetworkIdentity ident) { switch (ident.mType) { case TYPE_WIFI: return Objects.equal(mNetworkId, ident.mNetworkId); return Objects.equal( removeDoubleQuotes(mNetworkId), removeDoubleQuotes(ident.mNetworkId)); default: return false; } Loading services/java/com/android/server/net/NetworkPolicyManagerService.java +2 −5 Original line number Diff line number Diff line Loading @@ -52,7 +52,6 @@ import static android.net.NetworkTemplate.MATCH_MOBILE_ALL; import static android.net.NetworkTemplate.MATCH_WIFI; import static android.net.NetworkTemplate.buildTemplateMobileAll; import static android.net.TrafficStats.MB_IN_BYTES; import static android.net.wifi.WifiInfo.removeDoubleQuotes; import static android.net.wifi.WifiManager.CHANGE_REASON_ADDED; import static android.net.wifi.WifiManager.CHANGE_REASON_REMOVED; import static android.net.wifi.WifiManager.CONFIGURED_NETWORKS_CHANGED_ACTION; Loading Loading @@ -551,8 +550,7 @@ public class NetworkPolicyManagerService extends INetworkPolicyManager.Stub { final WifiConfiguration config = intent.getParcelableExtra( EXTRA_WIFI_CONFIGURATION); if (config.SSID != null) { final NetworkTemplate template = NetworkTemplate.buildTemplateWifi( removeDoubleQuotes(config.SSID)); final NetworkTemplate template = NetworkTemplate.buildTemplateWifi(config.SSID); synchronized (mRulesLock) { if (mNetworkPolicy.containsKey(template)) { mNetworkPolicy.remove(template); Loading Loading @@ -581,8 +579,7 @@ public class NetworkPolicyManagerService extends INetworkPolicyManager.Stub { final WifiInfo info = intent.getParcelableExtra(EXTRA_WIFI_INFO); final boolean meteredHint = info.getMeteredHint(); final NetworkTemplate template = NetworkTemplate.buildTemplateWifi( removeDoubleQuotes(info.getSSID())); final NetworkTemplate template = NetworkTemplate.buildTemplateWifi(info.getSSID()); synchronized (mRulesLock) { NetworkPolicy policy = mNetworkPolicy.get(template); if (policy == null && meteredHint) { Loading Loading
core/java/android/net/NetworkTemplate.java +3 −1 Original line number Diff line number Diff line Loading @@ -22,6 +22,7 @@ import static android.net.ConnectivityManager.TYPE_WIFI_P2P; import static android.net.ConnectivityManager.TYPE_WIMAX; import static android.net.NetworkIdentity.COMBINE_SUBTYPE_ENABLED; import static android.net.NetworkIdentity.scrubSubscriberId; import static android.net.wifi.WifiInfo.removeDoubleQuotes; import static android.telephony.TelephonyManager.NETWORK_CLASS_2_G; import static android.telephony.TelephonyManager.NETWORK_CLASS_3_G; import static android.telephony.TelephonyManager.NETWORK_CLASS_4_G; Loading Loading @@ -279,7 +280,8 @@ public class NetworkTemplate implements Parcelable { private boolean matchesWifi(NetworkIdentity ident) { switch (ident.mType) { case TYPE_WIFI: return Objects.equal(mNetworkId, ident.mNetworkId); return Objects.equal( removeDoubleQuotes(mNetworkId), removeDoubleQuotes(ident.mNetworkId)); default: return false; } Loading
services/java/com/android/server/net/NetworkPolicyManagerService.java +2 −5 Original line number Diff line number Diff line Loading @@ -52,7 +52,6 @@ import static android.net.NetworkTemplate.MATCH_MOBILE_ALL; import static android.net.NetworkTemplate.MATCH_WIFI; import static android.net.NetworkTemplate.buildTemplateMobileAll; import static android.net.TrafficStats.MB_IN_BYTES; import static android.net.wifi.WifiInfo.removeDoubleQuotes; import static android.net.wifi.WifiManager.CHANGE_REASON_ADDED; import static android.net.wifi.WifiManager.CHANGE_REASON_REMOVED; import static android.net.wifi.WifiManager.CONFIGURED_NETWORKS_CHANGED_ACTION; Loading Loading @@ -551,8 +550,7 @@ public class NetworkPolicyManagerService extends INetworkPolicyManager.Stub { final WifiConfiguration config = intent.getParcelableExtra( EXTRA_WIFI_CONFIGURATION); if (config.SSID != null) { final NetworkTemplate template = NetworkTemplate.buildTemplateWifi( removeDoubleQuotes(config.SSID)); final NetworkTemplate template = NetworkTemplate.buildTemplateWifi(config.SSID); synchronized (mRulesLock) { if (mNetworkPolicy.containsKey(template)) { mNetworkPolicy.remove(template); Loading Loading @@ -581,8 +579,7 @@ public class NetworkPolicyManagerService extends INetworkPolicyManager.Stub { final WifiInfo info = intent.getParcelableExtra(EXTRA_WIFI_INFO); final boolean meteredHint = info.getMeteredHint(); final NetworkTemplate template = NetworkTemplate.buildTemplateWifi( removeDoubleQuotes(info.getSSID())); final NetworkTemplate template = NetworkTemplate.buildTemplateWifi(info.getSSID()); synchronized (mRulesLock) { NetworkPolicy policy = mNetworkPolicy.get(template); if (policy == null && meteredHint) { Loading