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

Commit 9098d0a3 authored by Roshan Pius's avatar Roshan Pius Committed by android-build-merger
Browse files

Merge "Fix LocalOnlyHotspotReservation double stop of local hotspot." am:...

Merge "Fix LocalOnlyHotspotReservation double stop of local hotspot." am: c046f9f0 am: aa562f6d am: 48f566d5 am: d0ba20f1
am: 240c420e

Change-Id: Ib2a29ee6b83638fce0ca737f636bb284de1d8185
parents 3b1c3e65 240c420e
Loading
Loading
Loading
Loading
+8 −2
Original line number Diff line number Diff line
@@ -3406,6 +3406,7 @@ public class WifiManager {

        private final CloseGuard mCloseGuard = CloseGuard.get();
        private final WifiConfiguration mConfig;
        private boolean mClosed = false;

        /** @hide */
        @VisibleForTesting
@@ -3421,8 +3422,13 @@ public class WifiManager {
        @Override
        public void close() {
            try {
                synchronized (mLock) {
                    if (!mClosed) {
                        mClosed = true;
                        stopLocalOnlyHotspot();
                        mCloseGuard.close();
                    }
                }
            } catch (Exception e) {
                Log.e(TAG, "Failed to stop Local Only Hotspot.");
            }