From 56bba2008833c136e7c584782f3b3169f2f9f91e Mon Sep 17 00:00:00 2001 From: Brandon Maxwell Date: Thu, 28 Jan 2016 18:49:03 -0800 Subject: Adding flag to enable/disable Dialer ringing Bug=26864105 Change-Id: Ifc565320dd9fd8845c45551454e59020806d985c --- InCallUI/src/com/android/incallui/StatusBarNotifier.java | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'InCallUI/src') diff --git a/InCallUI/src/com/android/incallui/StatusBarNotifier.java b/InCallUI/src/com/android/incallui/StatusBarNotifier.java index 877ad65a9..e0bca4446 100644 --- a/InCallUI/src/com/android/incallui/StatusBarNotifier.java +++ b/InCallUI/src/com/android/incallui/StatusBarNotifier.java @@ -61,6 +61,11 @@ import java.util.Objects; public class StatusBarNotifier implements InCallPresenter.InCallStateListener, CallList.CallUpdateListener { + /* + * Flag used to determine if the Dialer is responsible for playing ringtones for incoming calls. + */ + private static final boolean IS_DIALER_RINGING_ENABLED = false; + // Notification types // Indicates that no notification is currently showing. private static final int NOTIFICATION_NONE = 0; @@ -318,7 +323,8 @@ public class StatusBarNotifier implements InCallPresenter.InCallStateListener, * Until the lookup is complete, the ringtone Uri is null */ private boolean shouldNotificationPlayRingtone(int notificationType, Uri ringtoneUri) { - return CompatUtils.isNCompatible() && notificationType == NOTIFICATION_INCOMING_CALL + return CompatUtils.isNCompatible() && IS_DIALER_RINGING_ENABLED + && notificationType == NOTIFICATION_INCOMING_CALL && ringtoneUri != null; } -- cgit v1.2.3