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

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

Merge "Use setFlow instead of addFlow" into main

parents 81eec34c 4f1be449
Loading
Loading
Loading
Loading
+7 −3
Original line number Diff line number Diff line
@@ -286,7 +286,9 @@ internal class TraceContextElement(

    init {
        if (usePerfettoSdk) {
            PerfettoTrace.end(PerfettoTraceConfig.COROUTINE_CATEGORY).addFlow(continuationId).emit()
            PerfettoTrace.end(PerfettoTraceConfig.COROUTINE_CATEGORY)
                .setFlow(continuationId.toLong())
                .emit()
        } else {
            Trace.traceEnd(Trace.TRACE_TAG_APP) // end: "TCE#init"
        }
@@ -321,7 +323,7 @@ internal class TraceContextElement(
                    PerfettoTraceConfig.COROUTINE_CATEGORY,
                    coroutineTraceName + if (continuationCount < 0) "" else continuationCount,
                )
                .addTerminatingFlow(continuationId)
                .setTerminatingFlow(continuationId.toLong())
                .emit()
            continuationId = nextRandomInt()
        } else {
@@ -371,7 +373,9 @@ internal class TraceContextElement(
        if (storage.data === oldState) return
        val contId = storage.restoreDataForSuspension(oldState)
        if (usePerfettoSdk) {
            PerfettoTrace.end(PerfettoTraceConfig.COROUTINE_CATEGORY).addFlow(contId).emit()
            PerfettoTrace.end(PerfettoTraceConfig.COROUTINE_CATEGORY)
                .setFlow(contId.toLong())
                .emit()
        } else {
            Trace.traceEnd(Trace.TRACE_TAG_APP) // end: coroutineTraceName
        }