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

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

Merge "Do not log the audio session requsted by the system" into main

parents 6ab67675 9a5a2210
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -28,6 +28,7 @@ import android.media.AudioRecordingConfiguration;
import android.media.AudioTrack;
import android.media.MediaRecorder;
import android.os.Handler;
import android.os.Process;
import android.telecom.Log;
import android.telecom.Logging.EventManager;
import android.telecom.PhoneAccountHandle;
@@ -288,6 +289,11 @@ public class CallAudioWatchdog extends CallsManagerListenerBase {
                        && config.getAudioAttributes().getUsage()
                        == AudioAttributes.USAGE_VOICE_COMMUNICATION) {

                    // Skip if the client's pid is same as myself
                    if (config.getClientPid() == Process.myPid()) {
                        continue;
                    }

                    // If an audio session is idle, we don't count it as playing.  It must be in a
                    // started state.
                    boolean isPlaying = config.getPlayerState() == PLAYER_STATE_STARTED;