am ce9b5c76: Merge "Fix walled garden detection on nakasi" into jb-dev
* commit 'ce9b5c7611954fba91f4983bd41c0507b9931046': Fix walled garden detection on nakasi
This commit is contained in:
@@ -263,12 +263,19 @@ public class WifiWatchdogStateMachine extends StateMachine {
|
|||||||
Context.CONNECTIVITY_SERVICE);
|
Context.CONNECTIVITY_SERVICE);
|
||||||
sWifiOnly = (cm.isNetworkSupported(ConnectivityManager.TYPE_MOBILE) == false);
|
sWifiOnly = (cm.isNetworkSupported(ConnectivityManager.TYPE_MOBILE) == false);
|
||||||
|
|
||||||
// Disable for wifi only devices.
|
// Watchdog is always enabled. Poor network detection & walled garden detection
|
||||||
if (Settings.Secure.getString(contentResolver, Settings.Secure.WIFI_WATCHDOG_ON) == null
|
// can individually be turned on/off
|
||||||
&& sWifiOnly) {
|
// TODO: Remove this setting & clean up state machine since we always have
|
||||||
log("Disabling watchog for wi-fi only device");
|
// watchdog in an enabled state
|
||||||
putSettingsBoolean(contentResolver, Settings.Secure.WIFI_WATCHDOG_ON, false);
|
putSettingsBoolean(contentResolver, Settings.Secure.WIFI_WATCHDOG_ON, true);
|
||||||
|
|
||||||
|
// Disable poor network avoidance, but keep watchdog active for walled garden detection
|
||||||
|
if (sWifiOnly) {
|
||||||
|
log("Disabling poor network avoidance for wi-fi only device");
|
||||||
|
putSettingsBoolean(contentResolver,
|
||||||
|
Settings.Secure.WIFI_WATCHDOG_POOR_NETWORK_TEST_ENABLED, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
WifiWatchdogStateMachine wwsm = new WifiWatchdogStateMachine(context);
|
WifiWatchdogStateMachine wwsm = new WifiWatchdogStateMachine(context);
|
||||||
wwsm.start();
|
wwsm.start();
|
||||||
return wwsm;
|
return wwsm;
|
||||||
|
|||||||
Reference in New Issue
Block a user