Merge "Replace dns_tls with private_dns_mode setting" am: ca92fb5e2b am: 768f467089

am: 3194e6cbb8

Change-Id: Iee5ceb25248a7611b84fc06f93f52e287062cecd
This commit is contained in:
Erik Kline
2017-11-07 06:18:39 +00:00
committed by android-build-merger
4 changed files with 322 additions and 14 deletions

View File

@@ -193,7 +193,7 @@ public class DevelopmentSettings extends RestrictedSettingsFragment
private static final String BLUETOOTH_SELECT_A2DP_CHANNEL_MODE_KEY = "bluetooth_select_a2dp_channel_mode";
private static final String BLUETOOTH_SELECT_A2DP_LDAC_PLAYBACK_QUALITY_KEY = "bluetooth_select_a2dp_ldac_playback_quality";
private static final String DNS_TLS_KEY = "dns_tls";
private static final String PRIVATE_DNS_PREF_KEY = "select_private_dns_configuration";
private static final String INACTIVE_APPS_KEY = "inactive_apps";
@@ -273,8 +273,6 @@ public class DevelopmentSettings extends RestrictedSettingsFragment
private ListPreference mBluetoothSelectA2dpChannelMode;
private ListPreference mBluetoothSelectA2dpLdacPlaybackQuality;
private SwitchPreference mDnsTls;
private SwitchPreference mOtaDisableAutomaticUpdate;
private SwitchPreference mWifiAllowScansWithTraffic;
private SwitchPreference mStrictMode;
@@ -495,7 +493,7 @@ public class DevelopmentSettings extends RestrictedSettingsFragment
mBluetoothSelectA2dpLdacPlaybackQuality = addListPreference(BLUETOOTH_SELECT_A2DP_LDAC_PLAYBACK_QUALITY_KEY);
initBluetoothConfigurationValues();
mDnsTls = findAndInitSwitchPref(DNS_TLS_KEY);
updatePrivateDnsSummary();
mWindowAnimationScale = addListPreference(WINDOW_ANIMATION_SCALE_KEY);
mTransitionAnimationScale = addListPreference(TRANSITION_ANIMATION_SCALE_KEY);
@@ -854,8 +852,7 @@ public class DevelopmentSettings extends RestrictedSettingsFragment
updateBluetoothDisableAbsVolumeOptions();
updateBluetoothEnableInbandRingingOptions();
updateBluetoothA2dpConfigurationValues();
updateSwitchPreference(mDnsTls, Settings.Global.getInt(cr,
Settings.Global.DNS_TLS_DISABLED, 0) == 0);
updatePrivateDnsSummary();
}
private void resetDangerousOptions() {
@@ -2020,6 +2017,13 @@ public class DevelopmentSettings extends RestrictedSettingsFragment
}
}
private void updatePrivateDnsSummary() {
final String summary = PrivateDnsModeDialogPreference.getSummaryStringForModeFromSettings(
getActivity().getContentResolver(), getActivity().getResources());
final Preference pref = findPreference(PRIVATE_DNS_PREF_KEY);
pref.setSummary(summary);
}
private void writeImmediatelyDestroyActivitiesOptions() {
try {
ActivityManager.getService().setAlwaysFinish(
@@ -2371,10 +2375,6 @@ public class DevelopmentSettings extends RestrictedSettingsFragment
writeBluetoothDisableAbsVolumeOptions();
} else if (preference == mBluetoothEnableInbandRinging) {
writeBluetoothEnableInbandRingingOptions();
} else if (preference == mDnsTls) {
Settings.Global.putInt(getActivity().getContentResolver(),
Settings.Global.DNS_TLS_DISABLED,
mDnsTls.isChecked() ? 0 : 1);
} else if (SHORTCUT_MANAGER_RESET_KEY.equals(preference.getKey())) {
resetShortcutManagerThrottling();
} else {