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

Commit 912e6ea5 authored by Zimuzo Ezeozue's avatar Zimuzo Ezeozue Committed by Android (Google) Code Review
Browse files

Merge "Fix Builder allocations" into main

parents 3035ebc0 add9be1a
Loading
Loading
Loading
Loading
+1 −4
Original line number Diff line number Diff line
@@ -214,9 +214,6 @@ public final class PerfettoTrackEventExtra {
         * Initialize the builder for a new trace event.
         */
        public Builder init(int traceType, PerfettoTrace.Category category) {
            if (!category.isEnabled()) {
                return this;
            }
            mTraceType = traceType;
            mCategory = category;
            mEventName = "";
@@ -228,7 +225,7 @@ public final class PerfettoTrackEventExtra {

            mExtra.reset();
            // Reset after on init in case the thread created builders without calling emit
            return initInternal(this, null, true);
            return initInternal(this, null, category.isEnabled());
        }

        /**
+2 −0
Original line number Diff line number Diff line
@@ -33,6 +33,7 @@ import androidx.test.InstrumentationRegistry;
import androidx.test.ext.junit.runners.AndroidJUnit4;

import org.junit.Before;
import org.junit.Ignore;
import org.junit.Rule;
import org.junit.Test;
import org.junit.runner.RunWith;
@@ -611,6 +612,7 @@ public class PerfettoTraceTest {

    @Test
    @RequiresFlagsEnabled(android.os.Flags.FLAG_PERFETTO_SDK_TRACING_V2)
    @Ignore("b/303199244")
    public void testMessageQueue() throws Exception {
        TraceConfig traceConfig = getTraceConfig("mq");