Re-enable on/off switch for Wi-Fi and Bluetooth Settings

- the switch was no more there when launching from an Intent (it was a regression)

Change-Id: I1fc95cad4523a1d3812323fb26908f925a9e623e
This commit is contained in:
Fabrice Di Meglio
2014-04-03 13:57:56 -07:00
parent a2e7af9112
commit 86ea97f452
2 changed files with 8 additions and 13 deletions

View File

@@ -412,12 +412,9 @@ public class WifiSettings extends RestrictedSettingsFragment
final Activity activity = getActivity();
mSwitch = new Switch(activity);
boolean addSwitch = false;
boolean addSwitch = true;
if (activity instanceof SettingsActivity) {
SettingsActivity sa = (SettingsActivity) activity;
addSwitch = sa.onIsHidingHeaders();
} else if (activity instanceof WifiPickerActivity) {
if (activity instanceof WifiPickerActivity) {
PreferenceActivity pa = (PreferenceActivity) activity;
addSwitch = pa.onIsHidingHeaders();
}