Download PAC when set after a diff PAC URL
Fix bug where rather than downloading new PAC file, the system would just send out broadcast saying proxy has changed. Now trigger a download of the file, and let the broadcast be sent when the download is complete. It is safe to pull out this port check as it is also performed at the time of trying to send the broadcast, and when the port is received. Removing it takes out a chance of any weird race conditions about setting the PAC and changing it before the callback completes. Bug: 17654639 Change-Id: Ic166d8f42bc388998a5aade147579d3ae1355c77
This commit is contained in:
@@ -265,14 +265,9 @@ public class PacManager {
|
||||
}
|
||||
Intent intent = new Intent();
|
||||
intent.setClassName(PAC_PACKAGE, PAC_SERVICE);
|
||||
// Already bound no need to bind again.
|
||||
if ((mProxyConnection != null) && (mConnection != null)) {
|
||||
if (mLastPort != -1) {
|
||||
sendPacBroadcast(new ProxyInfo(mPacUrl, mLastPort));
|
||||
} else {
|
||||
Log.e(TAG, "Received invalid port from Local Proxy,"
|
||||
+ " PAC will not be operational");
|
||||
}
|
||||
// Already bound no need to bind again, just download the new file.
|
||||
IoThread.getHandler().post(mPacDownloader);
|
||||
return;
|
||||
}
|
||||
mConnection = new ServiceConnection() {
|
||||
|
||||
Reference in New Issue
Block a user