Skip to content

Commit e6e8100

Browse files
isheriffAndroid (Google) Code Review
authored andcommitted
Merge "Cleanup on async disconnect and finalize" into jb-mr1-dev
2 parents 6dbf861 + fa3b625 commit e6e8100

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

wifi/java/android/net/wifi/WifiManager.java

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1274,6 +1274,7 @@ public void handleMessage(Message message) {
12741274
// This will cause all further async API calls on the WifiManager
12751275
// to fail and throw an exception
12761276
mAsyncChannel = null;
1277+
getLooper().quit();
12771278
break;
12781279
/* ActionListeners grouped together */
12791280
case WifiManager.CONNECT_NETWORK_FAILED:
@@ -1979,4 +1980,12 @@ public void captivePortalCheckComplete() {
19791980
mService.captivePortalCheckComplete();
19801981
} catch (RemoteException e) {}
19811982
}
1983+
1984+
protected void finalize() throws Throwable {
1985+
try {
1986+
mHandler.getLooper().quit();
1987+
} finally {
1988+
super.finalize();
1989+
}
1990+
}
19821991
}

0 commit comments

Comments
 (0)