commit | 40b249c1a6ae1aae7e3b4641bed0335e3dba11da | [log] [tgz] |
---|---|---|
author | Aaron Huang <huangaaron@google.com> | Mon May 31 11:07:54 2021 +0000 |
committer | Lorenzo Colitti <lorenzo@google.com> | Tue Jun 01 07:33:01 2021 +0000 |
tree | ba3883561a286af37dac3ff5d279c7fb6d97e3fe | |
parent | 947270efc3cf6ae619b6e720807eb5fe5b246396 [diff] |
Make sure the PAC script content is sent again ...when the PAC service crashes. Bug: 185409199 Test: manual Original-Change: https://android-review.googlesource.com/1711211 Merged-In: Ic76428f42f37f8552a526190764ad32e2874adb0 Change-Id: Ic76428f42f37f8552a526190764ad32e2874adb0
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); + } } } }