Unifying various tracing calls

Change-Id: Iedf6662ad1d7281b850bdc43b3a1e373ce535ac6
This commit is contained in:
Sunny Goyal
2019-10-14 14:06:38 -07:00
parent 4009493f3c
commit 17c72fbb60
17 changed files with 367 additions and 562 deletions

View File

@@ -22,7 +22,6 @@ import android.os.Looper;
import androidx.annotation.VisibleForTesting;
import com.android.launcher3.uioverrides.DejankBinderTracker;
import com.android.launcher3.util.ResourceBasedOverride.Overrides;
import java.util.concurrent.ExecutionException;
@@ -42,8 +41,8 @@ public class MainThreadInitializedObject<T> {
public T get(Context context) {
if (mValue == null) {
if (Looper.myLooper() == Looper.getMainLooper()) {
mValue = DejankBinderTracker.whitelistIpcs(() ->
mProvider.get(context.getApplicationContext()));
mValue = TraceHelper.whitelistIpcs("main.thread.object",
() -> mProvider.get(context.getApplicationContext()));
} else {
try {
return MAIN_EXECUTOR.submit(() -> get(context)).get();