Enable touch feedback settings when the phone is in silent mode

Allow users to change this settings when the phone is in silent mode, if
they prefer to make all interactions as silent as possible in that
context.

Fix: 165478128
Test: [Alarm|HapticFeedback|Media]Vibration[Intensity|Toggle]PreferenceControllerTest
Change-Id: I68f90559b2bf8088f22397412c149e2a4b91cf13
This commit is contained in:
Lais Andrade
2022-02-22 18:42:41 +00:00
parent 6368af8bdf
commit e000a21064
7 changed files with 110 additions and 29 deletions

View File

@@ -37,12 +37,6 @@ public class HapticFeedbackIntensityPreferenceController
VibrationAttributes.USAGE_TOUCH);
}
@Override
public boolean isRestrictedByRingerModeSilent() {
// Touch feedback is disabled when the phone is in silent mode.
return true;
}
@Override
public int readIntensity() {
final int hapticFeedbackEnabled = Settings.System.getInt(mContentResolver,