Merge "Fix LocalOnlyHotspotReservation double stop of local hotspot."
am: c046f9f039
Change-Id: I362b05f32fc26a7233bd4dd26b3e941c8d2e9a46
This commit is contained in:
@@ -3206,6 +3206,7 @@ public class WifiManager {
|
|||||||
|
|
||||||
private final CloseGuard mCloseGuard = CloseGuard.get();
|
private final CloseGuard mCloseGuard = CloseGuard.get();
|
||||||
private final WifiConfiguration mConfig;
|
private final WifiConfiguration mConfig;
|
||||||
|
private boolean mClosed = false;
|
||||||
|
|
||||||
/** @hide */
|
/** @hide */
|
||||||
@VisibleForTesting
|
@VisibleForTesting
|
||||||
@@ -3221,8 +3222,13 @@ public class WifiManager {
|
|||||||
@Override
|
@Override
|
||||||
public void close() {
|
public void close() {
|
||||||
try {
|
try {
|
||||||
stopLocalOnlyHotspot();
|
synchronized (mLock) {
|
||||||
mCloseGuard.close();
|
if (!mClosed) {
|
||||||
|
mClosed = true;
|
||||||
|
stopLocalOnlyHotspot();
|
||||||
|
mCloseGuard.close();
|
||||||
|
}
|
||||||
|
}
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
Log.e(TAG, "Failed to stop Local Only Hotspot.");
|
Log.e(TAG, "Failed to stop Local Only Hotspot.");
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user