Merge "Fix LocalOnlyHotspotReservation double stop of local hotspot."
This commit is contained in:
@@ -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 {
|
||||
stopLocalOnlyHotspot();
|
||||
mCloseGuard.close();
|
||||
synchronized (mLock) {
|
||||
if (!mClosed) {
|
||||
mClosed = true;
|
||||
stopLocalOnlyHotspot();
|
||||
mCloseGuard.close();
|
||||
}
|
||||
}
|
||||
} catch (Exception e) {
|
||||
Log.e(TAG, "Failed to stop Local Only Hotspot.");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user