Log class name to detect page scroll jank
Bug: 187306869
Test: robotests & take the trace and see the cuj section name
Change-Id: Idbaa62e764323f8c35c101caf2961b6c853c440f
diff --git a/src/com/android/settings/core/InstrumentedPreferenceFragment.java b/src/com/android/settings/core/InstrumentedPreferenceFragment.java
index 183c6f7..f6115fc 100644
--- a/src/com/android/settings/core/InstrumentedPreferenceFragment.java
+++ b/src/com/android/settings/core/InstrumentedPreferenceFragment.java
@@ -17,6 +17,7 @@
package com.android.settings.core;
import static com.android.internal.jank.InteractionJankMonitor.CUJ_SETTINGS_PAGE_SCROLL;
+import static com.android.internal.jank.InteractionJankMonitor.Configuration;
import android.content.Context;
import android.os.Bundle;
@@ -156,8 +157,11 @@
public void onScrollStateChanged(RecyclerView recyclerView, int newState) {
switch (newState) {
case RecyclerView.SCROLL_STATE_DRAGGING:
- // TODO: Update API with tag parameter (class name).
- mMonitor.begin(recyclerView, CUJ_SETTINGS_PAGE_SCROLL);
+ final Configuration.Builder builder =
+ new Configuration.Builder(CUJ_SETTINGS_PAGE_SCROLL)
+ .setView(recyclerView)
+ .setTag(mClassName);
+ mMonitor.begin(builder);
break;
case RecyclerView.SCROLL_STATE_IDLE:
mMonitor.end(CUJ_SETTINGS_PAGE_SCROLL);