From dcbdc0df43310d9ecb2324be8c5bd54d7727230e Mon Sep 17 00:00:00 2001 From: Brad Ebinger Date: Thu, 23 Jun 2016 17:42:30 -0700 Subject: 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 --- services/core/java/com/android/server/VibratorService.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/services/core/java/com/android/server/VibratorService.java b/services/core/java/com/android/server/VibratorService.java index 7f3eb15c6ebf..ab036c7163d3 100644 --- a/services/core/java/com/android/server/VibratorService.java +++ b/services/core/java/com/android/server/VibratorService.java @@ -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) { -- cgit v1.2.3-59-g8ed1b