Keep consistency between sound and accessibility settings.

Bug: 130741987
Test: Tested on device
Change-Id: Id6dd485c73f9453970b8d79929ffc04acb2c76c8
This commit is contained in:
Yiwen Chen
2019-05-01 12:13:56 -07:00
parent 4824f3a7c5
commit 494071463b
7 changed files with 150 additions and 13 deletions

View File

@@ -46,7 +46,11 @@ public class RingVibrationPreferenceFragment extends VibrationPreferenceFragment
@Override
protected String getVibrationEnabledSetting() {
return Settings.System.VIBRATE_WHEN_RINGING;
if (AccessibilitySettings.isRampingRingerEnabled(getContext())) {
return Settings.Global.APPLY_RAMPING_RINGER;
} else {
return Settings.System.VIBRATE_WHEN_RINGING;
}
}
@Override