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

Commit aa754923 authored by luochaojiang's avatar luochaojiang Committed by android-build-merger
Browse files

Merge "Merge "Stop InCall Notification to avoid track leak" am: b47c9019 am:...

Merge "Merge "Stop InCall Notification to avoid track leak" am: b47c9019 am: 11059667" into pi-dev-plus-aosp
am: e89aa91d

Change-Id: If29106e2f5884d9bf110c420f15b4a5fb2dcf546
parents 9d84084d e89aa91d
Loading
Loading
Loading
Loading
+6 −1
Original line number Diff line number Diff line
@@ -348,6 +348,7 @@ public class NotificationManagerService extends SystemService {
    private Uri mInCallNotificationUri;
    private AudioAttributes mInCallNotificationAudioAttributes;
    private float mInCallNotificationVolume;
    private Binder mCallNotificationToken = null;

    // used as a mutex for access to all active notifications & listeners
    final Object mNotificationLock = new Object();
@@ -4875,7 +4876,11 @@ public class NotificationManagerService extends SystemService {
                try {
                    final IRingtonePlayer player = mAudioManager.getRingtonePlayer();
                    if (player != null) {
                        player.play(new Binder(), mInCallNotificationUri,
                        if (mCallNotificationToken != null) {
                            player.stop(mCallNotificationToken);
                        }
                        mCallNotificationToken = new Binder();
                        player.play(mCallNotificationToken, mInCallNotificationUri,
                                mInCallNotificationAudioAttributes,
                                mInCallNotificationVolume, false);
                    }