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

Commit eb9d9b26 authored by Chalard Jean's avatar Chalard Jean Committed by Aaron Huang
Browse files

Make sure the PAC script content is sent again

...when the PAC service crashes.

Bug: 185409199
Test: manual
Change-Id: Ic76428f42f37f8552a526190764ad32e2874adb0
parent 0799624d
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);