summaryrefslogtreecommitdiffstats
path: root/services/java/com/android/server
diff options
context:
space:
mode:
authorIrfan Sheriff <isheriff@google.com>2010-05-26 17:16:47 -0700
committerIrfan Sheriff <isheriff@google.com>2010-05-26 17:16:47 -0700
commit7baec0fe4ef66ac308ebc132d6c08865db653b30 (patch)
tree6fd9dd4f8e2d5e659b53beb5df7bcfbd822383cd /services/java/com/android/server
parentfa499e46203dba2db2bb40f71e5af1650315c67c (diff)
downloadframeworks_base-7baec0fe4ef66ac308ebc132d6c08865db653b30.zip
frameworks_base-7baec0fe4ef66ac308ebc132d6c08865db653b30.tar.gz
frameworks_base-7baec0fe4ef66ac308ebc132d6c08865db653b30.tar.bz2
Fix null pointer exception
Bug: 2718857 Change-Id: I4b04284fd5b3a4881297fe15555e9f1ca91d73cb
Diffstat (limited to 'services/java/com/android/server')
-rw-r--r--services/java/com/android/server/NetworkManagementService.java7
1 files changed, 5 insertions, 2 deletions
diff --git a/services/java/com/android/server/NetworkManagementService.java b/services/java/com/android/server/NetworkManagementService.java
index 5e0439c..cbbc7be 100644
--- a/services/java/com/android/server/NetworkManagementService.java
+++ b/services/java/com/android/server/NetworkManagementService.java
@@ -504,8 +504,11 @@ class NetworkManagementService extends INetworkManagementService.Stub {
}
private String convertQuotedString(String s) {
- /* Replace \ with \\, then " with \" and add quotes at end */
- return '"' + s.replaceAll("\\\\","\\\\\\\\").replaceAll("\"","\\\\\"") + '"';
+ if (s == null) {
+ return s;
+ }
+ /* Replace \ with \\, then " with \" and add quotes at end */
+ return '"' + s.replaceAll("\\\\","\\\\\\\\").replaceAll("\"","\\\\\"") + '"';
}
public void stopAccessPoint() throws IllegalStateException {