Skip to content

Commit

Permalink
Revert D14423742: Use of TraceCompat
Browse files Browse the repository at this point in the history
Summary:
D14423742 introduced a regression on OSS test_android due to androidx.core.os not being available. I spent some time investigating a fix forward this morning, with no success. Reverting.

Changelog:

[Android] [Changed] - Revert 92f019c

Reviewed By: cpojer

Differential Revision: D14668728

fbshipit-source-id: c7542992805551dc4302626e1536759794efaa82
  • Loading branch information
hramos authored and facebook-github-bot committed Apr 1, 2019
1 parent fe9d21f commit 2a80a42
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
1 change: 0 additions & 1 deletion ReactAndroid/src/main/java/com/facebook/systrace/BUCK
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ load("//tools/build_defs/oss:rn_defs.bzl", "rn_android_library")
rn_android_library(
name = "systrace",
srcs = glob(["*.java"]),
is_androidx = True,
visibility = [
"PUBLIC",
],
Expand Down
11 changes: 8 additions & 3 deletions ReactAndroid/src/main/java/com/facebook/systrace/Systrace.java
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@

package com.facebook.systrace;

import androidx.core.os.TraceCompat;
import android.os.Build;
import android.os.Trace;

/**
* Systrace stub that mostly does nothing but delegates to Trace for beginning/ending sections.
Expand Down Expand Up @@ -54,11 +55,15 @@ public static void traceInstant(
}

public static void beginSection(long tag, final String sectionName) {
TraceCompat.beginSection(sectionName);
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN_MR2) {
Trace.beginSection(sectionName);
}
}

public static void endSection(long tag) {
TraceCompat.endSection();
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN_MR2) {
Trace.endSection();
}
}

public static void beginAsyncSection(
Expand Down

0 comments on commit 2a80a42

Please sign in to comment.