WifiWatchdogService - disable bad connections

Complete rewrite of WifiWatchdogService.java.  Checking for connectivity and managing wifi upon failure detection.

Change-Id: Ifcb8b5d7e0112cbc2f2282d76fdc93ea15527a44
This commit is contained in:
Isaac Levy
2011-06-06 15:34:01 -07:00
parent c1ba416af5
commit bc7dfb58bf
5 changed files with 872 additions and 1368 deletions

View File

@ -342,6 +342,7 @@ public class WifiService extends IWifiManager.Stub {
* Protected by mWifiStateTracker lock.
*/
private final WorkSource mTmpWorkSource = new WorkSource();
private WifiWatchdogService mWifiWatchdogService;
WifiService(Context context) {
mContext = context;
@ -431,6 +432,9 @@ public class WifiService extends IWifiManager.Stub {
Slog.i(TAG, "WifiService starting up with Wi-Fi " +
(wifiEnabled ? "enabled" : "disabled"));
setWifiEnabled(wifiEnabled);
//TODO: as part of WWS refactor, create only when needed
mWifiWatchdogService = new WifiWatchdogService(mContext);
}
private boolean testAndClearWifiSavedState() {
@ -1155,6 +1159,10 @@ public class WifiService extends IWifiManager.Stub {
pw.println();
pw.println("Locks held:");
mLocks.dump(pw);
pw.println();
pw.println("WifiWatchdogService dump");
mWifiWatchdogService.dump(pw);
}
private class WifiLock extends DeathRecipient {