Loading res/values/bools.xml +5 −0 Original line number Diff line number Diff line Loading @@ -49,6 +49,11 @@ <!--Whether help links are defined. --> <bool name="config_has_help">false</bool> <!-- Whether Wi-Fi settings should be shown or not. This also controls whether Wi-fi related sub-settings (e.g. Wi-Fi preferences) will surface in search results or not.--> <bool name="config_show_wifi_settings">true</bool> <!-- Whether location mode is available or not. --> <bool name="config_location_mode_available">true</bool> Loading src/com/android/settings/wifi/ConfigureWifiSettings.java +6 −0 Original line number Diff line number Diff line Loading @@ -44,6 +44,7 @@ public class ConfigureWifiSettings extends DashboardFragment { private static final String TAG = "ConfigureWifiSettings"; public static final String KEY_WIFI_CONFIGURE = "wifi_configure_settings_screen"; public static final String KEY_IP_ADDRESS = "current_ip_address"; private WifiWakeupPreferenceController mWifiWakeupPreferenceController; Loading Loading @@ -134,5 +135,10 @@ public class ConfigureWifiSettings extends DashboardFragment { return keys; } protected boolean isPageSearchEnabled(Context context) { return context.getResources() .getBoolean(R.bool.config_show_wifi_settings); } }; } src/com/android/settings/wifi/WifiMasterSwitchPreferenceController.java +2 −1 Original line number Diff line number Diff line Loading @@ -20,6 +20,7 @@ import android.support.v7.preference.PreferenceScreen; import com.android.settings.core.PreferenceControllerMixin; import com.android.settings.core.instrumentation.MetricsFeatureProvider; import com.android.settings.R; import com.android.settings.widget.SummaryUpdater; import com.android.settings.widget.MasterSwitchPreference; import com.android.settings.widget.MasterSwitchController; Loading Loading @@ -56,7 +57,7 @@ public class WifiMasterSwitchPreferenceController extends AbstractPreferenceCont @Override public boolean isAvailable() { return true; return mContext.getResources().getBoolean(R.bool.config_show_wifi_settings); } @Override Loading src/com/android/settings/wifi/WifiSettings.java +10 −8 Original line number Diff line number Diff line Loading @@ -167,7 +167,7 @@ public class WifiSettings extends RestrictedSettingsFragment private LinkablePreference mStatusMessagePreference; // For Search private static final String DATA_KEY_REFERENCE = "main_toggle_wifi"; public static final String DATA_KEY_REFERENCE = "main_toggle_wifi"; /** * Tracks whether the user initiated a connection via clicking in order to autoscroll to the Loading Loading @@ -1104,13 +1104,15 @@ public class WifiSettings extends RestrictedSettingsFragment final List<SearchIndexableRaw> result = new ArrayList<>(); final Resources res = context.getResources(); // Add fragment title // Add fragment title if we are showing this fragment if (res.getBoolean(R.bool.config_show_wifi_settings)) { SearchIndexableRaw data = new SearchIndexableRaw(context); data.title = res.getString(R.string.wifi_settings); data.screenTitle = res.getString(R.string.wifi_settings); data.keywords = res.getString(R.string.keywords_wifi); data.key = DATA_KEY_REFERENCE; result.add(data); } return result; } Loading tests/robotests/res/values-mcc999/config.xml +1 −0 Original line number Diff line number Diff line Loading @@ -20,6 +20,7 @@ <bool name="config_show_camera_laser_sensor">false</bool> <bool name="config_show_connectivity_monitor">false</bool> <bool name="config_display_recent_apps">false</bool> <bool name="config_show_wifi_settings">false</bool> <bool name="config_location_mode_available">false</bool> <bool name="config_show_wallpaper_attribution">false</bool> <bool name="config_show_default_home">false</bool> Loading Loading
res/values/bools.xml +5 −0 Original line number Diff line number Diff line Loading @@ -49,6 +49,11 @@ <!--Whether help links are defined. --> <bool name="config_has_help">false</bool> <!-- Whether Wi-Fi settings should be shown or not. This also controls whether Wi-fi related sub-settings (e.g. Wi-Fi preferences) will surface in search results or not.--> <bool name="config_show_wifi_settings">true</bool> <!-- Whether location mode is available or not. --> <bool name="config_location_mode_available">true</bool> Loading
src/com/android/settings/wifi/ConfigureWifiSettings.java +6 −0 Original line number Diff line number Diff line Loading @@ -44,6 +44,7 @@ public class ConfigureWifiSettings extends DashboardFragment { private static final String TAG = "ConfigureWifiSettings"; public static final String KEY_WIFI_CONFIGURE = "wifi_configure_settings_screen"; public static final String KEY_IP_ADDRESS = "current_ip_address"; private WifiWakeupPreferenceController mWifiWakeupPreferenceController; Loading Loading @@ -134,5 +135,10 @@ public class ConfigureWifiSettings extends DashboardFragment { return keys; } protected boolean isPageSearchEnabled(Context context) { return context.getResources() .getBoolean(R.bool.config_show_wifi_settings); } }; }
src/com/android/settings/wifi/WifiMasterSwitchPreferenceController.java +2 −1 Original line number Diff line number Diff line Loading @@ -20,6 +20,7 @@ import android.support.v7.preference.PreferenceScreen; import com.android.settings.core.PreferenceControllerMixin; import com.android.settings.core.instrumentation.MetricsFeatureProvider; import com.android.settings.R; import com.android.settings.widget.SummaryUpdater; import com.android.settings.widget.MasterSwitchPreference; import com.android.settings.widget.MasterSwitchController; Loading Loading @@ -56,7 +57,7 @@ public class WifiMasterSwitchPreferenceController extends AbstractPreferenceCont @Override public boolean isAvailable() { return true; return mContext.getResources().getBoolean(R.bool.config_show_wifi_settings); } @Override Loading
src/com/android/settings/wifi/WifiSettings.java +10 −8 Original line number Diff line number Diff line Loading @@ -167,7 +167,7 @@ public class WifiSettings extends RestrictedSettingsFragment private LinkablePreference mStatusMessagePreference; // For Search private static final String DATA_KEY_REFERENCE = "main_toggle_wifi"; public static final String DATA_KEY_REFERENCE = "main_toggle_wifi"; /** * Tracks whether the user initiated a connection via clicking in order to autoscroll to the Loading Loading @@ -1104,13 +1104,15 @@ public class WifiSettings extends RestrictedSettingsFragment final List<SearchIndexableRaw> result = new ArrayList<>(); final Resources res = context.getResources(); // Add fragment title // Add fragment title if we are showing this fragment if (res.getBoolean(R.bool.config_show_wifi_settings)) { SearchIndexableRaw data = new SearchIndexableRaw(context); data.title = res.getString(R.string.wifi_settings); data.screenTitle = res.getString(R.string.wifi_settings); data.keywords = res.getString(R.string.keywords_wifi); data.key = DATA_KEY_REFERENCE; result.add(data); } return result; } Loading
tests/robotests/res/values-mcc999/config.xml +1 −0 Original line number Diff line number Diff line Loading @@ -20,6 +20,7 @@ <bool name="config_show_camera_laser_sensor">false</bool> <bool name="config_show_connectivity_monitor">false</bool> <bool name="config_display_recent_apps">false</bool> <bool name="config_show_wifi_settings">false</bool> <bool name="config_location_mode_available">false</bool> <bool name="config_show_wallpaper_attribution">false</bool> <bool name="config_show_default_home">false</bool> Loading