Add a "Cellular data fallback" pref.
Also adjust working of the "lost internet" notification. Bug: 31075769 Change-Id: I17e18516c9bfdc32b38686191327b6d6f87aed95
This commit is contained in:
committed by
Lorenzo Colitti
parent
4753ad5902
commit
a317684cfc
@@ -173,8 +173,12 @@ public final class WifiNoInternetDialog extends AlertActivity implements
|
||||
} else {
|
||||
final String action = (accept ? "Switch" : "Cancel");
|
||||
Log.d(TAG, "LOST_INTERNET: " + action);
|
||||
Settings.Global.putInt(mAlertParams.mContext.getContentResolver(),
|
||||
Settings.Global.NETWORK_AVOID_BAD_WIFI, accept ? 1 : 0);
|
||||
// Only ever set the setting to 1. The values understood by ConnectivityService are null
|
||||
// (use carrier default) or 1 (avoid bad networks regardless of carrier).
|
||||
if (accept) {
|
||||
Settings.Global.putInt(mAlertParams.mContext.getContentResolver(),
|
||||
Settings.Global.NETWORK_AVOID_BAD_WIFI, 1);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user