Merge "Apply only RING_VIBRATION_INTENSITY to ringtone vibrations" into tm-dev

This commit is contained in:
TreeHugger Robot
2022-04-12 17:24:05 +00:00
committed by Android (Google) Code Review
3 changed files with 10 additions and 23 deletions

View File

@@ -41,21 +41,6 @@ public class RingVibrationPreferenceConfig extends VibrationPreferenceConfig {
return true;
}
@Override
public int readIntensity() {
final int vibrateWhenRinging = Settings.System.getInt(mContentResolver,
Settings.System.VIBRATE_WHEN_RINGING, ON);
if ((vibrateWhenRinging == OFF)
&& !mAudioManager.isRampingRingerEnabled()) {
// VIBRATE_WHEN_RINGING is deprecated but should still be applied if the user has
// turned it off and has not enabled the ramping ringer (old three-state setting).
return Vibrator.VIBRATION_INTENSITY_OFF;
}
return super.readIntensity();
}
@Override
public boolean updateIntensity(int intensity) {
final boolean success = super.updateIntensity(intensity);