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

Commit 7d916685 authored by Treehugger Robot's avatar Treehugger Robot Committed by Android (Google) Code Review
Browse files

Merge "AudioService: log reason for shouldNotificationSoundPlay false" into main

parents 001811d9 c14c66db
Loading
Loading
Loading
Loading
+4 −7
Original line number Diff line number Diff line
@@ -13911,9 +13911,8 @@ public class AudioService extends IAudioService.Stub
        final int stream = AudioAttributes.toLegacyStreamType(aa);
        final boolean mutingFromVolume = getStreamVolume(stream) == 0;
        if (mutingFromVolume) {
            if (DEBUG_VOL) {
                Slog.d(TAG, "notification should not play due to muted stream " + stream);
            }
            Slog.i(TAG, "shouldNotificationSoundPlay false: muted stream:" + stream
                    + " attr:" + aa);
            return false;
        }
@@ -13926,10 +13925,8 @@ public class AudioService extends IAudioService.Stub
        // is the owner of GAIN_TRANSIENT_EXCLUSIVE focus also recording?
        final boolean mutingFromFocusAndRecording = mRecordMonitor.isRecordingActiveForUid(uid);
        if (mutingFromFocusAndRecording) {
            if (DEBUG_VOL) {
                Slog.d(TAG, "notification should not play due to exclusive focus owner recording "
                        + " uid:" + uid);
            }
            Slog.i(TAG, "shouldNotificationSoundPlay false: exclusive focus owner recording "
                        + " uid:" + uid + " attr:" + aa);
            return false;
        }
        return true;