Access internal ringer mode to properly vibrate in DND
Currently, an incoming call will not vibrate properly in certain cases in DND mode. Specifically, if Priority Only mode is set, but Calls from anyone are allowed. We now get the internal ringer mode to detect if the incoming call is ringing while in DND mode. Bug: 29184073 Change-Id: I1e0e7cf384a2bc1df1378043cd3f7e9dec57a94c
This commit is contained in:
@@ -487,7 +487,7 @@ public class VibratorService extends IVibratorService.Stub
|
||||
|
||||
private boolean shouldVibrateForRingtone() {
|
||||
AudioManager audioManager = (AudioManager) mContext.getSystemService(Context.AUDIO_SERVICE);
|
||||
int ringerMode = audioManager.getRingerMode();
|
||||
int ringerMode = audioManager.getRingerModeInternal();
|
||||
// "Also vibrate for calls" Setting in Sound
|
||||
if (Settings.System.getInt(
|
||||
mContext.getContentResolver(), Settings.System.VIBRATE_WHEN_RINGING, 0) != 0) {
|
||||
|
||||
Reference in New Issue
Block a user