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

Commit 5951998d authored by Dichen Zhang's avatar Dichen Zhang
Browse files

Add Recorder Session ID

Add new session ID key to MediaRecorder and MediaMetrics.

Test: make
      CTS MediaRecorderTest
      Set session ID manually and print log
Change-Id: Ib04ed48b76c3097ca7d93a9bd5ff587d9119bc9e
parent 566d1e92
Loading
Loading
Loading
Loading
+13 −0
Original line number Diff line number Diff line
@@ -148,6 +148,19 @@ public class MediaRecorder implements AudioRouting,
                ActivityThread.currentOpPackageName());
    }

    /**
     * Sets the log session ID for MediaRecorder.
     *
     * <p>The log session ID is a random 32-byte hexadecimal string that is used for monitoring the
     * MediaRecorder performance.</p>
     *
     * @param id the global ID for monitoring the MediaRecorder performance
     * @hide
     */
    public void setLogSessionId(@NonNull String id) {
        setParameter("log-session-id=" + id);
    }

    /**
     * Sets a {@link android.hardware.Camera} to use for recording.
     *