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

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

Merge "Fix LocalOnlyHotspotReservation double stop of local hotspot."

am: c046f9f0

Change-Id: I362b05f32fc26a7233bd4dd26b3e941c8d2e9a46
parents f1891778 c046f9f0
Loading
Loading
Loading
Loading
+8 −2
Original line number Diff line number Diff line
@@ -3206,6 +3206,7 @@ public class WifiManager {

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

        /** @hide */
        @VisibleForTesting
@@ -3221,8 +3222,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.");
            }