Skip to content

Commit 0e09082

Browse files
author
Robert Greenwalt
committed
Notify people of empty proxies too.
We were telling people when the proxy changed, except if it was changed to null. bug:5263946 Change-Id: I83416dac8fe992168a8aafd5676f9faee4e484d0
1 parent 22aa780 commit 0e09082

2 files changed

Lines changed: 5 additions & 2 deletions

File tree

services/java/com/android/server/ConnectivityService.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2618,7 +2618,8 @@ private void handleApplyDefaultProxy(int type) {
26182618
}
26192619
}
26202620
if (VDBG) log("changing default proxy to " + proxy);
2621-
if ((proxy == null && mGlobalProxy == null) || proxy.equals(mGlobalProxy)) return;
2621+
2622+
// global trumps default, if set, ignore this.
26222623
if (mGlobalProxy != null) return;
26232624
sendProxyBroadcast(proxy);
26242625
}

telephony/java/com/android/internal/telephony/gsm/GsmDataConnectionTracker.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1768,8 +1768,10 @@ protected void onDataSetupComplete(AsyncResult ar) {
17681768
ApnSetting apn = apnContext.getApnSetting();
17691769
if (apn.proxy != null && apn.proxy.length() != 0) {
17701770
try {
1771+
String port = apn.port;
1772+
if (TextUtils.isEmpty(port)) port = "8080";
17711773
ProxyProperties proxy = new ProxyProperties(apn.proxy,
1772-
Integer.parseInt(apn.port), null);
1774+
Integer.parseInt(port), null);
17731775
dcac.setLinkPropertiesHttpProxySync(proxy);
17741776
} catch (NumberFormatException e) {
17751777
loge("onDataSetupComplete: NumberFormatException making ProxyProperties (" +

0 commit comments

Comments
 (0)