Merge "Make sure the PAC script content is sent again" into sc-dev
diff --git a/services/core/java/com/android/server/connectivity/PacProxyService.java b/services/core/java/com/android/server/connectivity/PacProxyService.java
index d23b488..0070339 100644
--- a/services/core/java/com/android/server/connectivity/PacProxyService.java
+++ b/services/core/java/com/android/server/connectivity/PacProxyService.java
@@ -345,7 +345,14 @@
if (mProxyService == null) {
Log.e(TAG, "No proxy service");
} else {
- mNetThreadHandler.post(mPacDownloader);
+ // If mCurrentPac is not null, then the PacService might have
+ // crashed and restarted. The download task will not actually
+ // call setCurrentProxyScript, so call setCurrentProxyScript here.
+ if (mCurrentPac != null) {
+ setCurrentProxyScript(mCurrentPac);
+ } else {
+ mNetThreadHandler.post(mPacDownloader);
+ }
}
}
}