diff --git a/res/values/strings.xml b/res/values/strings.xml index c956e7bd656..e22e5f2df15 100644 --- a/res/values/strings.xml +++ b/res/values/strings.xml @@ -3452,22 +3452,6 @@ WARNING: Device protection features will not work on this device while this setting is turned on. - - Wireless display certification - - Enable Wi\u2011Fi Verbose Logging - - Aggressive Wi\u2011Fi to Cellular handover - - Always allow Wi\u2011Fi Roam Scans - - Show options for wireless display certification - - Increase Wi\u2011Fi logging level, show per SSID RSSI in Wi\u2011Fi Picker - - When enabled, Wi\u2011Fi will be more aggressive in handing over the data connection to Cellular, when Wi\u2011Fi signal is low - - Allow/Disallow Wi\u2011Fi Roam Scans based on the amount of data traffic present at the interface Logger buffer sizes @@ -3479,6 +3463,32 @@ Enable view attribute inspection + + + Networking + + + Wireless display certification + + Enable Wi\u2011Fi Verbose Logging + + Aggressive Wi\u2011Fi to Cellular handover + + Always allow Wi\u2011Fi Roam Scans + + Use legacy DHCP client + + + Show options for wireless display certification + + Increase Wi\u2011Fi logging level, show per SSID RSSI in Wi\u2011Fi Picker + + When enabled, Wi\u2011Fi will be more aggressive in handing over the data connection to Cellular, when Wi\u2011Fi signal is low + + Allow/Disallow Wi\u2011Fi Roam Scans based on the amount of data traffic present at the interface + + Use the DHCP client from Lollipop instead of the new Android DHCP client. + Allow USB debugging? USB debugging is intended for development purposes only. Use it to copy data between your computer and your device, install apps on your device without notification, and read log data. diff --git a/res/xml/development_prefs.xml b/res/xml/development_prefs.xml index f31d5569ca4..1a03c2c835c 100644 --- a/res/xml/development_prefs.xml +++ b/res/xml/development_prefs.xml @@ -103,6 +103,18 @@ android:title="@string/verify_apps_over_usb_title" android:summary="@string/verify_apps_over_usb_summary"/> + + + + + + android:summary="@string/wifi_allow_scan_with_traffic_summary"/> - + + android:summary="@string/legacy_dhcp_client_summary"/> diff --git a/src/com/android/settings/DevelopmentSettings.java b/src/com/android/settings/DevelopmentSettings.java index a001fd78687..51177e1743f 100644 --- a/src/com/android/settings/DevelopmentSettings.java +++ b/src/com/android/settings/DevelopmentSettings.java @@ -135,13 +135,16 @@ public class DevelopmentSettings extends SettingsPreferenceFragment private static final String OVERLAY_DISPLAY_DEVICES_KEY = "overlay_display_devices"; private static final String DEBUG_DEBUGGING_CATEGORY_KEY = "debug_debugging_category"; private static final String DEBUG_APPLICATIONS_CATEGORY_KEY = "debug_applications_category"; + private static final String SELECT_LOGD_SIZE_KEY = "select_logd_size"; + private static final String SELECT_LOGD_SIZE_PROPERTY = "persist.logd.size"; + private static final String SELECT_LOGD_DEFAULT_SIZE_PROPERTY = "ro.logd.size"; + + private static final String DEBUG_NETWORKING_CATEGORY_KEY = "debug_networking_category"; private static final String WIFI_DISPLAY_CERTIFICATION_KEY = "wifi_display_certification"; private static final String WIFI_VERBOSE_LOGGING_KEY = "wifi_verbose_logging"; private static final String WIFI_AGGRESSIVE_HANDOVER_KEY = "wifi_aggressive_handover"; private static final String WIFI_ALLOW_SCAN_WITH_TRAFFIC_KEY = "wifi_allow_scan_with_traffic"; - private static final String SELECT_LOGD_SIZE_KEY = "select_logd_size"; - private static final String SELECT_LOGD_SIZE_PROPERTY = "persist.logd.size"; - private static final String SELECT_LOGD_DEFAULT_SIZE_PROPERTY = "ro.logd.size"; + private static final String WIFI_LEGACY_DHCP_CLIENT_KEY = "legacy_dhcp_client"; private static final String OPENGL_TRACES_KEY = "enable_opengl_traces"; @@ -197,6 +200,7 @@ public class DevelopmentSettings extends SettingsPreferenceFragment private SwitchPreference mWifiDisplayCertification; private SwitchPreference mWifiVerboseLogging; private SwitchPreference mWifiAggressiveHandover; + private SwitchPreference mLegacyDhcpClient; private SwitchPreference mWifiAllowScansWithTraffic; private SwitchPreference mStrictMode; @@ -336,6 +340,7 @@ public class DevelopmentSettings extends SettingsPreferenceFragment mWifiVerboseLogging = findAndInitSwitchPref(WIFI_VERBOSE_LOGGING_KEY); mWifiAggressiveHandover = findAndInitSwitchPref(WIFI_AGGRESSIVE_HANDOVER_KEY); mWifiAllowScansWithTraffic = findAndInitSwitchPref(WIFI_ALLOW_SCAN_WITH_TRAFFIC_KEY); + mLegacyDhcpClient = findAndInitSwitchPref(WIFI_LEGACY_DHCP_CLIENT_KEY); mLogdSize = addListPreference(SELECT_LOGD_SIZE_KEY); mWindowAnimationScale = addListPreference(WINDOW_ANIMATION_SCALE_KEY); @@ -543,6 +548,7 @@ public class DevelopmentSettings extends SettingsPreferenceFragment updateWifiVerboseLoggingOptions(); updateWifiAggressiveHandoverOptions(); updateWifiAllowScansWithTrafficOptions(); + updateLegacyDhcpClientOptions(); updateSimulateColorSpace(); updateUseNuplayerOptions(); updateUSBAudioOptions(); @@ -1073,6 +1079,18 @@ public class DevelopmentSettings extends SettingsPreferenceFragment mWifiManager.setAllowScansWithTraffic(mWifiAllowScansWithTraffic.isChecked() ? 1 : 0); } + private void updateLegacyDhcpClientOptions() { + updateSwitchPreference(mLegacyDhcpClient, Settings.Global.getInt( + getActivity().getContentResolver(), + Settings.Global.LEGACY_DHCP_CLIENT, 0) != 0); + } + + private void writeLegacyDhcpClientOptions() { + Settings.Global.putInt(getActivity().getContentResolver(), + Settings.Global.LEGACY_DHCP_CLIENT, + mLegacyDhcpClient.isChecked() ? 1 : 0); + } + private void updateLogdSizeValues() { if (mLogdSize != null) { String currentValue = SystemProperties.get(SELECT_LOGD_SIZE_PROPERTY); @@ -1450,6 +1468,8 @@ public class DevelopmentSettings extends SettingsPreferenceFragment writeWifiAggressiveHandoverOptions(); } else if (preference == mWifiAllowScansWithTraffic) { writeWifiAllowScansWithTrafficOptions(); + } else if (preference == mLegacyDhcpClient) { + writeLegacyDhcpClientOptions(); } else if (preference == mUseAwesomePlayer) { writeUseAwesomePlayerOptions(); } else if (preference == mUSBAudio) {