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

Commit d3205e37 authored by Adnan Begovic's avatar Adnan Begovic Committed by Gerrit Code Review
Browse files

nms: Actually allow smsRingtone to work.

  The change If02b398d5eb3520f173d7b71a11df2536a218bc1
  introduced the ability to allow notification to play
  a sound while in call. HOWEVER, it never worked since
  the notification record would be stripped of its effects.

TICKET: PAELLA-135
Change-Id: I736f027be91c321dcacd7bad974ed6f94bd1fc7e
parent afa838c1
Loading
Loading
Loading
Loading
+6 −4
Original line number Diff line number Diff line
@@ -2086,13 +2086,16 @@ public class NotificationManagerService extends SystemService {
    };

    private String disableNotificationEffects(NotificationRecord record) {
        boolean smsRingtone = getContext().getResources().getBoolean(
                com.android.internal.R.bool.config_sms_ringtone_incall);
        if (mDisableNotificationEffects) {
            return "booleanState";
        }
        if ((mListenerHints & HINT_HOST_DISABLE_EFFECTS) != 0) {
            return "listenerHints";
        }
        if (mCallState != TelephonyManager.CALL_STATE_IDLE && !mZenModeHelper.isCall(record)) {
        if (mCallState != TelephonyManager.CALL_STATE_IDLE && !mZenModeHelper.isCall(record)
                && !smsRingtone) {
            return "callState";
        }
        return null;
@@ -2648,9 +2651,8 @@ public class NotificationManagerService extends SystemService {
        if (disableEffects != null) {
            ZenLog.traceDisableEffects(record, disableEffects);
        }
        boolean smsRingtone = getContext().getResources().getBoolean(
                com.android.internal.R.bool.config_sms_ringtone_incall);
        if ((disableEffects == null || (smsRingtone && mInCall))

        if ((disableEffects == null)
                && (!(record.isUpdate
                    && (notification.flags & Notification.FLAG_ONLY_ALERT_ONCE) != 0 ))
                && (record.getUserId() == UserHandle.USER_ALL ||