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

Commit c046f9f0 authored by Roshan Pius's avatar Roshan Pius Committed by Gerrit Code Review
Browse files

Merge "Fix LocalOnlyHotspotReservation double stop of local hotspot."

parents 24ae670b ee7b0a6a
Loading
Loading
Loading
Loading
+8 −2
Original line number Diff line number Diff line
@@ -2563,6 +2563,7 @@ public class WifiManager {

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

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