summaryrefslogtreecommitdiffstats
path: root/wifi
diff options
context:
space:
mode:
authorIrfan Sheriff <isheriff@google.com>2012-10-11 13:25:09 -0700
committerIrfan Sheriff <isheriff@google.com>2012-10-11 14:21:34 -0700
commitfa3b6258bedf6a66b676020f0ff531d4c9c579eb (patch)
tree88fa06bff48f5aca504b6089a37cc409fb947e4a /wifi
parent17cf1f2bbc3f7d4f367dbbee935d2939957c0ef6 (diff)
downloadframeworks_base-fa3b6258bedf6a66b676020f0ff531d4c9c579eb.zip
frameworks_base-fa3b6258bedf6a66b676020f0ff531d4c9c579eb.tar.gz
frameworks_base-fa3b6258bedf6a66b676020f0ff531d4c9c579eb.tar.bz2
Cleanup on async disconnect and finalize
Bug: 7326726 Change-Id: I6cca47a70cc0f29c68f922618cdcc181fb919a05
Diffstat (limited to 'wifi')
-rw-r--r--wifi/java/android/net/wifi/WifiManager.java9
1 files changed, 9 insertions, 0 deletions
diff --git a/wifi/java/android/net/wifi/WifiManager.java b/wifi/java/android/net/wifi/WifiManager.java
index 75b8bcf..e913d10 100644
--- a/wifi/java/android/net/wifi/WifiManager.java
+++ b/wifi/java/android/net/wifi/WifiManager.java
@@ -1274,6 +1274,7 @@ public class WifiManager {
// This will cause all further async API calls on the WifiManager
// to fail and throw an exception
mAsyncChannel = null;
+ getLooper().quit();
break;
/* ActionListeners grouped together */
case WifiManager.CONNECT_NETWORK_FAILED:
@@ -1979,4 +1980,12 @@ public class WifiManager {
mService.captivePortalCheckComplete();
} catch (RemoteException e) {}
}
+
+ protected void finalize() throws Throwable {
+ try {
+ mHandler.getLooper().quit();
+ } finally {
+ super.finalize();
+ }
+ }
}