This commit is contained in:
@@ -188,7 +188,9 @@ public class WifiSettings extends PreferenceActivity implements DialogInterface.
|
||||
public boolean onOptionsItemSelected(MenuItem item) {
|
||||
switch (item.getItemId()) {
|
||||
case MENU_ID_SCAN:
|
||||
if (mWifiManager.isWifiEnabled()) {
|
||||
mScanner.resume();
|
||||
}
|
||||
return true;
|
||||
case MENU_ID_ADVANCED:
|
||||
startActivity(new Intent(this, AdvancedSettings.class));
|
||||
@@ -451,6 +453,10 @@ public class WifiSettings extends PreferenceActivity implements DialogInterface.
|
||||
}
|
||||
|
||||
private void updateConnectionState(DetailedState state) {
|
||||
/* sticky broadcasts can call this when wifi is disabled */
|
||||
if (!mWifiManager.isWifiEnabled())
|
||||
return;
|
||||
|
||||
if (state == DetailedState.OBTAINING_IPADDR) {
|
||||
mScanner.pause();
|
||||
} else {
|
||||
|
Reference in New Issue
Block a user