Disable ring, notification and touch vibration in silent mode
Disable haptic settings for ring, notification and touch feedback when the phone ringer mode is set to silent. Preserve the setting values and display message explaining why those settings are disabled. Bug: 203188852 Test: *Vibration[Intensity|Toggle]PreferenceControllerTest Change-Id: I6c24079ece9d637f2feb487f756937888a92caa7
This commit is contained in:
@@ -37,6 +37,12 @@ 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,
|
||||
|
Reference in New Issue
Block a user