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

Commit f6b46cb8 authored by Jason Monk's avatar Jason Monk
Browse files

Fix crash in PacManager

The PacManager would clear the pac url by setting it to null, however
everywhere else, pac url is cleared to Uri.EMPTY.  This sometimes leads
to an NPE when PAC is set and cleared rapidly and take down the whole
framework.

Bug: 17581527
Change-Id: I84ce215f4f6a8a7e804372fc0a1e20ac609a21f1
parent b6812b64
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -71,7 +71,7 @@ public class PacManager {
    public static final String KEY_PROXY = "keyProxy";
    private String mCurrentPac;
    @GuardedBy("mProxyLock")
    private Uri mPacUrl;
    private Uri mPacUrl = Uri.EMPTY;

    private AlarmManager mAlarmManager;
    @GuardedBy("mProxyLock")
@@ -175,7 +175,7 @@ public class PacManager {
        } else {
            getAlarmManager().cancel(mPacRefreshIntent);
            synchronized (mProxyLock) {
                mPacUrl = null;
                mPacUrl = Uri.EMPTY;
                mCurrentPac = null;
                if (mProxyService != null) {
                    try {