Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 5df281a5 authored by Jason Monk's avatar Jason Monk
Browse files

Fix badness from proxy refactoring.

When no PAC file getPacFileUrl() can return null now, which you
cannot call toString() on.

Change-Id: Ife00f641c2c17fbc1bde17017d9af59d23cb9182
parent 11b7a381
Loading
Loading
Loading
Loading
+3 −1
Original line number Original line Diff line number Diff line
@@ -278,8 +278,10 @@ public final class Proxy {
            host = p.getHost();
            host = p.getHost();
            port = Integer.toString(p.getPort());
            port = Integer.toString(p.getPort());
            exclList = p.getExclusionListAsString();
            exclList = p.getExclusionListAsString();
            if (p.getPacFileUrl() != null) {
                pacFileUrl = p.getPacFileUrl().toString();
                pacFileUrl = p.getPacFileUrl().toString();
            }
            }
        }
        setHttpProxySystemProperty(host, port, exclList, pacFileUrl);
        setHttpProxySystemProperty(host, port, exclList, pacFileUrl);
    }
    }


+4 −2
Original line number Original line Diff line number Diff line
@@ -1327,13 +1327,15 @@ public final class ActivityManagerService extends ActivityManagerNative
                String host = "";
                String host = "";
                String port = "";
                String port = "";
                String exclList = "";
                String exclList = "";
                String pacFileUrl = null;
                String pacFileUrl = "";
                if (proxy != null) {
                if (proxy != null) {
                    host = proxy.getHost();
                    host = proxy.getHost();
                    port = Integer.toString(proxy.getPort());
                    port = Integer.toString(proxy.getPort());
                    exclList = proxy.getExclusionListAsString();
                    exclList = proxy.getExclusionListAsString();
                    if (proxy.getPacFileUrl() != null) {
                        pacFileUrl = proxy.getPacFileUrl().toString();
                        pacFileUrl = proxy.getPacFileUrl().toString();
                    }
                    }
                }
                synchronized (ActivityManagerService.this) {
                synchronized (ActivityManagerService.this) {
                    for (int i = mLruProcesses.size() - 1 ; i >= 0 ; i--) {
                    for (int i = mLruProcesses.size() - 1 ; i >= 0 ; i--) {
                        ProcessRecord r = mLruProcesses.get(i);
                        ProcessRecord r = mLruProcesses.get(i);