Merge "[OneSearch] Log events with timestamp into logcat for debugging." into sc-v2-dev am: 137dd35d26

Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Launcher3/+/15975400

Change-Id: I59676fdf7a8ee0bbeda31f1e7ac691ef0275a161
This commit is contained in:
TreeHugger Robot
2021-10-07 08:29:59 +00:00
committed by Automerger Merge Worker
2 changed files with 12 additions and 0 deletions

View File

@@ -21,6 +21,7 @@ import static android.view.View.MeasureSpec.makeMeasureSpec;
import static com.android.launcher3.logging.StatsLogManager.LauncherEvent.LAUNCHER_ALLAPPS_VERTICAL_SWIPE_BEGIN;
import static com.android.launcher3.logging.StatsLogManager.LauncherEvent.LAUNCHER_ALLAPPS_VERTICAL_SWIPE_END;
import static com.android.launcher3.util.LogConfig.SEARCH_LOGGING;
import static com.android.launcher3.util.UiThreadHelper.hideKeyboardAsync;
import android.content.Context;
@@ -40,6 +41,7 @@ import com.android.launcher3.BaseRecyclerView;
import com.android.launcher3.DeviceProfile;
import com.android.launcher3.LauncherAppState;
import com.android.launcher3.R;
import com.android.launcher3.Utilities;
import com.android.launcher3.config.FeatureFlags;
import com.android.launcher3.logging.StatsLogManager;
import com.android.launcher3.views.ActivityContext;
@@ -54,6 +56,7 @@ import java.util.List;
public class AllAppsRecyclerView extends BaseRecyclerView {
private static final String TAG = "AllAppsContainerView";
private static final boolean DEBUG = false;
private static final boolean DEBUG_LATENCY = Utilities.isPropertyEnabled(SEARCH_LOGGING);
private AlphabeticalAppsList mApps;
private final int mNumAppsPerRow;
@@ -133,6 +136,10 @@ public class AllAppsRecyclerView extends BaseRecyclerView {
if (DEBUG) {
Log.d(TAG, "onDraw at = " + System.currentTimeMillis());
}
if (DEBUG_LATENCY) {
Log.d(SEARCH_LOGGING,
"-- Recycle view onDraw, time stamp = " + System.currentTimeMillis());
}
super.onDraw(c);
}

View File

@@ -35,4 +35,9 @@ public class LogConfig {
* When turned on, we enable doodle related logging.
*/
public static final String DOODLE_LOGGING = "DoodleLogging";
/**
* When turned on, we enable suggest related logging.
*/
public static final String SEARCH_LOGGING = "SearchLogging";
}