Update hidden API with a persist option.
WifiManager.setNumAllowedChannels now needs a boolean persist arg. Part of the fix for 1625953.
This commit is contained in:
@@ -141,7 +141,7 @@ public class AdvancedSettings extends PreferenceActivity
|
|||||||
try {
|
try {
|
||||||
int numChannels = Integer.parseInt((String) newValue);
|
int numChannels = Integer.parseInt((String) newValue);
|
||||||
WifiManager wifiManager = (WifiManager) getSystemService(WIFI_SERVICE);
|
WifiManager wifiManager = (WifiManager) getSystemService(WIFI_SERVICE);
|
||||||
if (!wifiManager.setNumAllowedChannels(numChannels)) {
|
if (!wifiManager.setNumAllowedChannels(numChannels, true)) {
|
||||||
Toast.makeText(this, R.string.wifi_setting_num_channels_error,
|
Toast.makeText(this, R.string.wifi_setting_num_channels_error,
|
||||||
Toast.LENGTH_SHORT).show();
|
Toast.LENGTH_SHORT).show();
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user