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:
@@ -35,6 +35,12 @@ public class RingVibrationPreferenceConfig extends VibrationPreferenceConfig {
|
||||
mAudioManager = context.getSystemService(AudioManager.class);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isRestrictedByRingerModeSilent() {
|
||||
// Incoming calls never vibrate when the phone is in silent mode.
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int readIntensity() {
|
||||
final int vibrateWhenRinging = Settings.System.getInt(mContentResolver,
|
||||
|
Reference in New Issue
Block a user