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

Commit c878cd96 authored by Zhang Fang's avatar Zhang Fang
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.
Let it play the ringtone during the call.

CRs-Fixed: 536094

Change-Id: I2ee162ffa61a83186249410e7b50747d394500ea
parent 32e45ef3
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -1405,4 +1405,6 @@

    <!-- Configuration to sending and receiving Mms when mobile data is disable.-->
    <bool name="config_setup_mms_data">false</bool>
    <!-- Configuration to play sms ringtone during MO/MT call -->
    <bool name="config_sms_ringtone_incall">false</bool>
</resources>
+3 −0
Original line number Diff line number Diff line
@@ -1794,4 +1794,7 @@
  <java-symbol type="bool" name="config_enableCpuBoostForOverScrollerFling" />
  <java-symbol type="bool" name="use_motion_accel" />
  <java-symbol type="bool" name="config_setup_mms_data" />

  <!-- Configuration to play sms ringtone during MO/MT call -->
  <java-symbol type="bool" name="config_sms_ringtone_incall" />
</resources>
+6 −1
Original line number Diff line number Diff line
@@ -1832,8 +1832,13 @@ public class NotificationManagerService extends INotificationManager.Stub
                                + n.getPackageName());
                    }

                    // Have ring tone when received SMS when the device is CT mode
                    boolean smsRingtone = mContext.getResources().getBoolean(
                            com.android.internal.R.bool.config_sms_ringtone_incall);

                    // If we're not supposed to beep, vibrate, etc. then don't.
                    if (((mDisabledNotifications & StatusBarManager.DISABLE_NOTIFICATION_ALERTS) == 0)
                    if (((mDisabledNotifications & StatusBarManager.DISABLE_NOTIFICATION_ALERTS)
                            == 0 || (smsRingtone && mInCall))
                            && (!(old != null
                                && (notification.flags & Notification.FLAG_ONLY_ALERT_ONCE) != 0 ))
                            && (r.getUserId() == UserHandle.USER_ALL ||