add setting to control wifi handover
Change-Id: I85a8c8d501238a8115713ca7b018cdac6d0af95a
This commit is contained in:
@@ -3176,10 +3176,18 @@
|
||||
<string name="wifi_display_certification">Wireless display certification</string>
|
||||
<!-- Setting Checkbox title whether to enable WiFi Verbose Logging. [CHAR LIMIT=40] -->
|
||||
<string name="wifi_verbose_logging">Enable WiFi Verbose Logging</string>
|
||||
<!-- Setting Checkbox title whether to enable WiFi Aggressive Handover. [CHAR LIMIT=40] -->
|
||||
<string name="wifi_aggressive_handover">Aggressive Wifi to Cellular handover</string>
|
||||
<!-- Setting Checkbox title whether to enable WiFi Scanning in the presence of traffic. [CHAR LIMIT=80] -->
|
||||
<string name="wifi_allow_scan_with_traffic">Always allow Wifi Roam Scans</string>
|
||||
<!-- setting Checkbox summary whether to show options for wireless display certification -->
|
||||
<string name="wifi_display_certification_summary">Show options for wireless display certification</string>
|
||||
<!-- Setting Checkbox title whether to enable Wifi verbose Logging [CHAR LIMIT=80] -->
|
||||
<!-- Setting Checkbox summary whether to enable Wifi verbose Logging [CHAR LIMIT=80] -->
|
||||
<string name="wifi_verbose_logging_summary">Increase Wifi logging level, show per SSID RSSI in WiFi Picker</string>
|
||||
<!-- Setting Checkbox summary whether to enable Wifi aggressive handover [CHAR LIMIT=130] -->
|
||||
<string name="wifi_aggressive_handover_summary">When enabled, Wifi will be more aggressive in handing over the data connection to Cellular, when Wifi signal is low</string>
|
||||
<!-- Setting Checkbox summary whether to always allow WiFi Roam Scans [CHAR LIMIT=130] -->
|
||||
<string name="wifi_allow_scan_with_traffic_summary">Allow/Disallow Wifi Roam Scans based on the amount of data traffic present at the interface</string>
|
||||
<!-- UI debug setting: limit size of Android logger buffers -->
|
||||
<string name="select_logd_size_title">Logger buffer sizes</string>
|
||||
<!-- UI debug setting: limit size of Android logger buffers [CHAR LIMIT=59] -->
|
||||
|
@@ -111,6 +111,16 @@
|
||||
android:title="@string/wifi_verbose_logging" />
|
||||
android:summary="@string/wifi_verbose_logging_summary"/>
|
||||
|
||||
<CheckBoxPreference
|
||||
android:key="wifi_aggressive_handover"
|
||||
android:title="@string/wifi_aggressive_handover" />
|
||||
android:summary="@string/wifi_aggressive_handover_summary"/>
|
||||
|
||||
<CheckBoxPreference
|
||||
android:key="wifi_allow_scan_with_traffic"
|
||||
android:title="@string/wifi_allow_scan_with_traffic" />
|
||||
android:summary="@string/wifi_allow_scan_with_traffic_summary"/>
|
||||
|
||||
<ListPreference
|
||||
android:key="select_logd_size"
|
||||
android:title="@string/select_logd_size_title"
|
||||
|
@@ -136,6 +136,8 @@ public class DevelopmentSettings extends SettingsPreferenceFragment
|
||||
private static final String DEBUG_APPLICATIONS_CATEGORY_KEY = "debug_applications_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";
|
||||
@@ -189,6 +191,8 @@ public class DevelopmentSettings extends SettingsPreferenceFragment
|
||||
private CheckBoxPreference mVerifyAppsOverUsb;
|
||||
private CheckBoxPreference mWifiDisplayCertification;
|
||||
private CheckBoxPreference mWifiVerboseLogging;
|
||||
private CheckBoxPreference mWifiAggressiveHandover;
|
||||
private CheckBoxPreference mWifiAllowScansWithTraffic;
|
||||
|
||||
private CheckBoxPreference mStrictMode;
|
||||
private CheckBoxPreference mPointerLocation;
|
||||
@@ -319,6 +323,8 @@ public class DevelopmentSettings extends SettingsPreferenceFragment
|
||||
mDebugHwOverdraw = addListPreference(DEBUG_HW_OVERDRAW_KEY);
|
||||
mWifiDisplayCertification = findAndInitCheckboxPref(WIFI_DISPLAY_CERTIFICATION_KEY);
|
||||
mWifiVerboseLogging = findAndInitCheckboxPref(WIFI_VERBOSE_LOGGING_KEY);
|
||||
mWifiAggressiveHandover = findAndInitCheckboxPref(WIFI_AGGRESSIVE_HANDOVER_KEY);
|
||||
mWifiAllowScansWithTraffic = findAndInitCheckboxPref(WIFI_ALLOW_SCAN_WITH_TRAFFIC_KEY);
|
||||
mLogdSize = addListPreference(SELECT_LOGD_SIZE_KEY);
|
||||
|
||||
mWindowAnimationScale = addListPreference(WINDOW_ANIMATION_SCALE_KEY);
|
||||
@@ -534,6 +540,8 @@ public class DevelopmentSettings extends SettingsPreferenceFragment
|
||||
updateLogdSizeValues();
|
||||
updateWifiDisplayCertificationOptions();
|
||||
updateWifiVerboseLoggingOptions();
|
||||
updateWifiAggressiveHandoverOptions();
|
||||
updateWifiAllowScansWithTrafficOptions();
|
||||
updateSimulateColorSpace();
|
||||
updateUseNuplayerOptions();
|
||||
}
|
||||
@@ -1050,6 +1058,24 @@ public class DevelopmentSettings extends SettingsPreferenceFragment
|
||||
mWifiManager.enableVerboseLogging(mWifiVerboseLogging.isChecked() ? 1 : 0);
|
||||
}
|
||||
|
||||
private void updateWifiAggressiveHandoverOptions() {
|
||||
boolean enabled = mWifiManager.getAggressiveHandover() > 0;
|
||||
updateCheckBox(mWifiAggressiveHandover, enabled);
|
||||
}
|
||||
|
||||
private void writeWifiAggressiveHandoverOptions() {
|
||||
mWifiManager.enableAggressiveHandover(mWifiAggressiveHandover.isChecked() ? 1 : 0);
|
||||
}
|
||||
|
||||
private void updateWifiAllowScansWithTrafficOptions() {
|
||||
boolean enabled = mWifiManager.getAllowScansWithTraffic() > 0;
|
||||
updateCheckBox(mWifiAllowScansWithTraffic, enabled);
|
||||
}
|
||||
|
||||
private void writeWifiAllowScansWithTrafficOptions() {
|
||||
mWifiManager.setAllowScansWithTraffic(mWifiAllowScansWithTraffic.isChecked() ? 1 : 0);
|
||||
}
|
||||
|
||||
private void updateLogdSizeValues() {
|
||||
if (mLogdSize != null) {
|
||||
String currentValue = SystemProperties.get(SELECT_LOGD_SIZE_PROPERTY);
|
||||
@@ -1394,6 +1420,10 @@ public class DevelopmentSettings extends SettingsPreferenceFragment
|
||||
writeWifiDisplayCertificationOptions();
|
||||
} else if (preference == mWifiVerboseLogging) {
|
||||
writeWifiVerboseLoggingOptions();
|
||||
} else if (preference == mWifiAggressiveHandover) {
|
||||
writeWifiAggressiveHandoverOptions();
|
||||
} else if (preference == mWifiAllowScansWithTraffic) {
|
||||
writeWifiAllowScansWithTrafficOptions();
|
||||
} else if (preference == mUseNuplayer) {
|
||||
writeUseNuplayerOptions();
|
||||
} else {
|
||||
|
Reference in New Issue
Block a user