Revert "Adding main thread binder tracing in development build."
Revert submission 23482347-launcher-binder-tracing
Reason for revert: Broken Build 10242119 on git_master on errorprone b/285434612
Reverted changes: /q/submissionid:23482347-launcher-binder-tracing
Change-Id: Id9726474265e839a59d6eb34822e7a86d40f0fc9
diff --git a/src/com/android/launcher3/Launcher.java b/src/com/android/launcher3/Launcher.java
index ac46c82..db5a27a 100644
--- a/src/com/android/launcher3/Launcher.java
+++ b/src/com/android/launcher3/Launcher.java
@@ -442,7 +442,8 @@
Trace.beginAsyncSection(DISPLAY_ALL_APPS_TRACE_METHOD_NAME,
DISPLAY_ALL_APPS_TRACE_COOKIE);
}
- TraceHelper.INSTANCE.beginSection(ON_CREATE_EVT);
+ Object traceToken = TraceHelper.INSTANCE.beginSection(ON_CREATE_EVT,
+ TraceHelper.FLAG_UI_EVENT);
if (DEBUG_STRICT_MODE) {
StrictMode.setThreadPolicy(new StrictMode.ThreadPolicy.Builder()
.detectDiskReads()
@@ -575,7 +576,7 @@
LauncherOverlayPlugin.class, false /* allowedMultiple */);
mRotationHelper.initialize();
- TraceHelper.INSTANCE.endSection();
+ TraceHelper.INSTANCE.endSection(traceToken);
mUserChangedCallbackCloseable = UserCache.INSTANCE.get(this).addUserChangeListener(
() -> getStateManager().goToState(NORMAL));
@@ -1073,14 +1074,15 @@
@Override
protected void onStart() {
- TraceHelper.INSTANCE.beginSection(ON_START_EVT);
+ Object traceToken = TraceHelper.INSTANCE.beginSection(ON_START_EVT,
+ TraceHelper.FLAG_UI_EVENT);
super.onStart();
if (!mDeferOverlayCallbacks) {
mOverlayManager.onActivityStarted(this);
}
mAppWidgetHolder.setActivityStarted(true);
- TraceHelper.INSTANCE.endSection();
+ TraceHelper.INSTANCE.endSection(traceToken);
}
@Override
@@ -1251,7 +1253,8 @@
@Override
protected void onResume() {
- TraceHelper.INSTANCE.beginSection(ON_RESUME_EVT);
+ Object traceToken = TraceHelper.INSTANCE.beginSection(ON_RESUME_EVT,
+ TraceHelper.FLAG_UI_EVENT);
super.onResume();
if (mDeferOverlayCallbacks) {
@@ -1261,7 +1264,7 @@
}
DragView.removeAllViews(this);
- TraceHelper.INSTANCE.endSection();
+ TraceHelper.INSTANCE.endSection(traceToken);
}
@Override
@@ -1649,7 +1652,7 @@
if (Utilities.isRunningInTestHarness()) {
Log.d(TestProtocol.PERMANENT_DIAG_TAG, "Launcher.onNewIntent: " + intent);
}
- TraceHelper.INSTANCE.beginSection(ON_NEW_INTENT_EVT);
+ Object traceToken = TraceHelper.INSTANCE.beginSection(ON_NEW_INTENT_EVT);
super.onNewIntent(intent);
boolean alreadyOnHome = hasWindowFocus() && ((intent.getFlags() &
@@ -1696,7 +1699,7 @@
showAllAppsWorkTabFromIntent(alreadyOnHome);
}
- TraceHelper.INSTANCE.endSection();
+ TraceHelper.INSTANCE.endSection(traceToken);
}
protected void toggleAllAppsFromIntent(boolean alreadyOnHome) {
@@ -2295,7 +2298,7 @@
* Implementation of the method from LauncherModel.Callbacks.
*/
public void startBinding() {
- TraceHelper.INSTANCE.beginSection("startBinding");
+ Object traceToken = TraceHelper.INSTANCE.beginSection("startBinding");
// Floating panels (except the full widget sheet) are associated with individual icons. If
// we are starting a fresh bind, close all such panels as all the icons are about
// to go away.
@@ -2313,7 +2316,7 @@
if (mHotseat != null) {
mHotseat.resetLayout(getDeviceProfile().isVerticalBarLayout());
}
- TraceHelper.INSTANCE.endSection();
+ TraceHelper.INSTANCE.endSection(traceToken);
}
@Override
@@ -2566,7 +2569,7 @@
return view;
}
- TraceHelper.INSTANCE.beginSection("BIND_WIDGET_id=" + item.appWidgetId);
+ Object traceToken = TraceHelper.INSTANCE.beginSection("BIND_WIDGET_id=" + item.appWidgetId);
try {
final LauncherAppWidgetProviderInfo appWidgetInfo;
@@ -2696,7 +2699,7 @@
}
prepareAppWidget(view, item);
} finally {
- TraceHelper.INSTANCE.endSection();
+ TraceHelper.INSTANCE.endSection(traceToken);
}
return view;
@@ -2789,7 +2792,7 @@
* Implementation of the method from LauncherModel.Callbacks.
*/
public void finishBindingItems(IntSet pagesBoundFirst) {
- TraceHelper.INSTANCE.beginSection("finishBindingItems");
+ Object traceToken = TraceHelper.INSTANCE.beginSection("finishBindingItems");
mWorkspace.restoreInstanceStateForRemainingPages();
setWorkspaceLoading(false);
@@ -2814,7 +2817,7 @@
mDeviceProfile.inv.numFolderColumns * mDeviceProfile.inv.numFolderRows);
getViewCache().setCacheSize(R.layout.folder_page, 2);
- TraceHelper.INSTANCE.endSection();
+ TraceHelper.INSTANCE.endSection(traceToken);
mWorkspace.removeExtraEmptyScreen(true);
}