diff options
| author | Irfan Sheriff <isheriff@google.com> | 2012-04-27 21:24:17 -0700 |
|---|---|---|
| committer | Irfan Sheriff <isheriff@google.com> | 2012-04-27 21:24:17 -0700 |
| commit | 00a10a1494954d124e1b11bc1ba3128e47b8ffbd (patch) | |
| tree | 6c0b8b5bd09c5209bad0b319af5af227abb843b2 /services/java/com/android/server/net/NetworkPolicyManagerService.java | |
| parent | ca7086f5bdbc404b01863770b6023d069f4ab720 (diff) | |
| download | frameworks_base-00a10a1494954d124e1b11bc1ba3128e47b8ffbd.zip frameworks_base-00a10a1494954d124e1b11bc1ba3128e47b8ffbd.tar.gz frameworks_base-00a10a1494954d124e1b11bc1ba3128e47b8ffbd.tar.bz2 | |
Handle null SSID cleanly
Bug: 6411912
Change-Id: I12f9df403c9633d928d898ae675ce36303dda1a8
Diffstat (limited to 'services/java/com/android/server/net/NetworkPolicyManagerService.java')
| -rw-r--r-- | services/java/com/android/server/net/NetworkPolicyManagerService.java | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/services/java/com/android/server/net/NetworkPolicyManagerService.java b/services/java/com/android/server/net/NetworkPolicyManagerService.java index f873b6c..5255647 100644 --- a/services/java/com/android/server/net/NetworkPolicyManagerService.java +++ b/services/java/com/android/server/net/NetworkPolicyManagerService.java @@ -500,12 +500,14 @@ public class NetworkPolicyManagerService extends INetworkPolicyManager.Stub { if (reason == CHANGE_REASON_REMOVED) { final WifiConfiguration config = intent.getParcelableExtra( EXTRA_WIFI_CONFIGURATION); - final NetworkTemplate template = NetworkTemplate.buildTemplateWifi( - removeDoubleQuotes(config.SSID)); - synchronized (mRulesLock) { - if (mNetworkPolicy.containsKey(template)) { - mNetworkPolicy.remove(template); - writePolicyLocked(); + if (config.SSID != null) { + final NetworkTemplate template = NetworkTemplate.buildTemplateWifi( + removeDoubleQuotes(config.SSID)); + synchronized (mRulesLock) { + if (mNetworkPolicy.containsKey(template)) { + mNetworkPolicy.remove(template); + writePolicyLocked(); + } } } } |
