Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 2b227316 authored by yanglv's avatar yanglv Committed by Linux Build Service Account
Browse files

Mms: Fix no ringtone for MT SMS during the call

If phone status is active, it will block ringtone sound.
If phone status is idle it will play ringtone sound by
Ringtone Player. Add config based functionality to play
the SMS ringtone during a call

CRs-Fixed: 771756

Change-Id: If02b398d5eb3520f173d7b71a11df2536a218bc1
parent 4da8907f
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -2306,4 +2306,6 @@
    <integer name="ascrollboost_timeout">0</integer>
    <integer-array name="ascrollboost_param_value"/>

   <!-- Configuration to play sms ringtone during MO/MT call -->
   <bool name="config_sms_ringtone_incall">false</bool>
</resources>
+2 −0
Original line number Diff line number Diff line
@@ -2359,4 +2359,6 @@

  <!-- for wifi auto connection -->
  <java-symbol type="bool" name="wifi_autocon" />
  <!-- Configuration to play sms ringtone during MO/MT call -->
  <java-symbol type="bool" name="config_sms_ringtone_incall" />
</resources>
+3 −1
Original line number Diff line number Diff line
@@ -2339,7 +2339,9 @@ public class NotificationManagerService extends SystemService {
        if (disableEffects != null) {
            ZenLog.traceDisableEffects(record, disableEffects);
        }
        if (disableEffects == null
        boolean smsRingtone = getContext().getResources().getBoolean(
                com.android.internal.R.bool.config_sms_ringtone_incall);
        if ((disableEffects == null || (smsRingtone && mInCall))
                && (!(record.isUpdate
                    && (notification.flags & Notification.FLAG_ONLY_ALERT_ONCE) != 0 ))
                && (record.getUserId() == UserHandle.USER_ALL ||