Merge "Fix null pointer exception" into froyo

This commit is contained in:
Irfan Sheriff
2010-05-26 21:32:29 -07:00
committed by Android (Google) Code Review

View File

@@ -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 {