diff options
| -rw-r--r-- | core/java/android/net/Proxy.java | 4 | ||||
| -rw-r--r-- | services/core/java/com/android/server/am/ActivityManagerService.java | 6 |
2 files changed, 7 insertions, 3 deletions
diff --git a/core/java/android/net/Proxy.java b/core/java/android/net/Proxy.java index 8f41e8561876..daf0065d1c47 100644 --- a/core/java/android/net/Proxy.java +++ b/core/java/android/net/Proxy.java @@ -278,7 +278,9 @@ public final class Proxy { host = p.getHost(); port = Integer.toString(p.getPort()); exclList = p.getExclusionListAsString(); - pacFileUrl = p.getPacFileUrl().toString(); + if (p.getPacFileUrl() != null) { + pacFileUrl = p.getPacFileUrl().toString(); + } } setHttpProxySystemProperty(host, port, exclList, pacFileUrl); } diff --git a/services/core/java/com/android/server/am/ActivityManagerService.java b/services/core/java/com/android/server/am/ActivityManagerService.java index 09e7e12140a7..9f6dd0b24c2a 100644 --- a/services/core/java/com/android/server/am/ActivityManagerService.java +++ b/services/core/java/com/android/server/am/ActivityManagerService.java @@ -1327,12 +1327,14 @@ public final class ActivityManagerService extends ActivityManagerNative String host = ""; String port = ""; String exclList = ""; - String pacFileUrl = null; + String pacFileUrl = ""; if (proxy != null) { host = proxy.getHost(); port = Integer.toString(proxy.getPort()); exclList = proxy.getExclusionListAsString(); - pacFileUrl = proxy.getPacFileUrl().toString(); + if (proxy.getPacFileUrl() != null) { + pacFileUrl = proxy.getPacFileUrl().toString(); + } } synchronized (ActivityManagerService.this) { for (int i = mLruProcesses.size() - 1 ; i >= 0 ; i--) { |