Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 40b249c1 authored by Aaron Huang's avatar Aaron Huang Committed by Lorenzo Colitti
Browse files

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
parent 947270ef
Loading
Loading
Loading
Loading
+8 −1
Original line number Diff line number Diff line
@@ -344,11 +344,18 @@ public class PacProxyService extends IPacProxyManager.Stub {
                    mProxyService = IProxyService.Stub.asInterface(binder);
                    if (mProxyService == null) {
                        Log.e(TAG, "No proxy service");
                    } else {
                        // 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);
                        }
                    }
                }
            }
        };
        mContext.bindService(intent, mConnection,
                Context.BIND_AUTO_CREATE | Context.BIND_NOT_FOREGROUND | Context.BIND_NOT_VISIBLE);