summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Aaron Huang <huangaaron@google.com> 2021-06-01 08:47:13 +0000
committer Android (Google) Code Review <android-gerrit@google.com> 2021-06-01 08:47:13 +0000
commit10cbb66f1eb5303923fc0ba48016c9591e2e3390 (patch)
tree61fce74225ae01969c8172a7fe4a90ca073e9f8e
parentc65974f14e0e6520631161231bb8ecbb021b275b (diff)
parent40b249c1a6ae1aae7e3b4641bed0335e3dba11da (diff)
Merge "Make sure the PAC script content is sent again" into sc-dev
-rw-r--r--services/core/java/com/android/server/connectivity/PacProxyService.java9
1 files changed, 8 insertions, 1 deletions
diff --git a/services/core/java/com/android/server/connectivity/PacProxyService.java b/services/core/java/com/android/server/connectivity/PacProxyService.java
index d23b488f3054..00703390a118 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 @@ public class PacProxyService extends IPacProxyManager.Stub {
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);
+ }
}
}
}