Enable debug tracing for a lab-only non-starting app from all apps

Bug: 132900132
Change-Id: I9c5bb51e49f865ea1e1d3d2209a8dfb149f66e87
This commit is contained in:
vadimt
2019-05-22 12:58:35 -07:00
parent 9e26fccacc
commit 3ab80bb734
7 changed files with 43 additions and 6 deletions

View File

@@ -66,14 +66,26 @@ public class ItemClickHandler {
}
private static void onClick(View v, String sourceContainer) {
if (com.android.launcher3.TestProtocol.sDebugTracing) {
android.util.Log.d(com.android.launcher3.TestProtocol.NO_START_TAG,
"onClick 1");
}
// Make sure that rogue clicks don't get through while allapps is launching, or after the
// view has detached (it's possible for this to happen if the view is removed mid touch).
if (v.getWindowToken() == null) {
if (com.android.launcher3.TestProtocol.sDebugTracing) {
android.util.Log.d(com.android.launcher3.TestProtocol.NO_START_TAG,
"onClick 2");
}
return;
}
Launcher launcher = Launcher.getLauncher(v.getContext());
if (!launcher.getWorkspace().isFinishedSwitchingState()) {
if (com.android.launcher3.TestProtocol.sDebugTracing) {
android.util.Log.d(com.android.launcher3.TestProtocol.NO_START_TAG,
"onClick 3");
}
return;
}
@@ -85,6 +97,10 @@ public class ItemClickHandler {
onClickFolderIcon(v);
}
} else if (tag instanceof AppInfo) {
if (com.android.launcher3.TestProtocol.sDebugTracing) {
android.util.Log.d(com.android.launcher3.TestProtocol.NO_START_TAG,
"onClick 4");
}
startAppShortcutOrInfoActivity(v, (AppInfo) tag, launcher,
sourceContainer == null ? CONTAINER_ALL_APPS: sourceContainer);
} else if (tag instanceof LauncherAppWidgetInfo) {
@@ -216,6 +232,10 @@ public class ItemClickHandler {
private static void startAppShortcutOrInfoActivity(View v, ItemInfo item, Launcher launcher,
@Nullable String sourceContainer) {
if (com.android.launcher3.TestProtocol.sDebugTracing) {
android.util.Log.d(com.android.launcher3.TestProtocol.NO_START_TAG,
"startAppShortcutOrInfoActivity");
}
Intent intent;
if (item instanceof PromiseAppInfo) {
PromiseAppInfo promiseAppInfo = (PromiseAppInfo) item;