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
diff --git a/src/com/android/settings/bluetooth/BluetoothSettings.java b/src/com/android/settings/bluetooth/BluetoothSettings.java
index 624b318..7068bc7 100755
--- a/src/com/android/settings/bluetooth/BluetoothSettings.java
+++ b/src/com/android/settings/bluetooth/BluetoothSettings.java
@@ -129,14 +129,12 @@
 
         final SettingsActivity activity = (SettingsActivity) getActivity();
 
-        if (activity.onIsHidingHeaders()) {
-            activity.getActionBar().setDisplayOptions(ActionBar.DISPLAY_SHOW_CUSTOM,
-                    ActionBar.DISPLAY_SHOW_CUSTOM);
-            activity.getActionBar().setCustomView(mSwitch, new ActionBar.LayoutParams(
-                    ActionBar.LayoutParams.WRAP_CONTENT,
-                    ActionBar.LayoutParams.WRAP_CONTENT,
-                    Gravity.CENTER_VERTICAL | Gravity.END));
-        }
+        activity.getActionBar().setDisplayOptions(ActionBar.DISPLAY_SHOW_CUSTOM,
+                ActionBar.DISPLAY_SHOW_CUSTOM);
+        activity.getActionBar().setCustomView(mSwitch, new ActionBar.LayoutParams(
+                ActionBar.LayoutParams.WRAP_CONTENT,
+                ActionBar.LayoutParams.WRAP_CONTENT,
+                Gravity.CENTER_VERTICAL | Gravity.END));
     }
 
     @Override
diff --git a/src/com/android/settings/wifi/WifiSettings.java b/src/com/android/settings/wifi/WifiSettings.java
index 21fecd3..43f9f75 100644
--- a/src/com/android/settings/wifi/WifiSettings.java
+++ b/src/com/android/settings/wifi/WifiSettings.java
@@ -412,12 +412,9 @@
             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();
             }