summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Chalard Jean <jchalard@google.com> 2021-05-14 23:31:02 +0900
committer Aaron Huang <huangaaron@google.com> 2021-05-26 18:52:38 +0800
commiteb9d9b261ee580e2ab3169f3d5b92d8f0bc09a80 (patch)
treec9539fa3a56aac76fbeb0955fbbe1534b329805b
parent0799624dc7eb4b4641b4659af5b5ec4b9f80dd81 (diff)
Make sure the PAC script content is sent again
...when the PAC service crashes. Bug: 185409199 Test: manual Change-Id: Ic76428f42f37f8552a526190764ad32e2874adb0
-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);
+ }
}
}
}