Merge "Log class name to detect page scroll jank" into sc-dev am: 20177f9b09
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/14860444 Change-Id: I19d81083acbb8a293348eae57ca5aa3e0ef0e0b7
This commit is contained in:
@@ -17,6 +17,7 @@
|
|||||||
package com.android.settings.core;
|
package com.android.settings.core;
|
||||||
|
|
||||||
import static com.android.internal.jank.InteractionJankMonitor.CUJ_SETTINGS_PAGE_SCROLL;
|
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.content.Context;
|
||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
@@ -156,8 +157,11 @@ public abstract class InstrumentedPreferenceFragment extends ObservablePreferenc
|
|||||||
public void onScrollStateChanged(RecyclerView recyclerView, int newState) {
|
public void onScrollStateChanged(RecyclerView recyclerView, int newState) {
|
||||||
switch (newState) {
|
switch (newState) {
|
||||||
case RecyclerView.SCROLL_STATE_DRAGGING:
|
case RecyclerView.SCROLL_STATE_DRAGGING:
|
||||||
// TODO: Update API with tag parameter (class name).
|
final Configuration.Builder builder =
|
||||||
mMonitor.begin(recyclerView, CUJ_SETTINGS_PAGE_SCROLL);
|
new Configuration.Builder(CUJ_SETTINGS_PAGE_SCROLL)
|
||||||
|
.setView(recyclerView)
|
||||||
|
.setTag(mClassName);
|
||||||
|
mMonitor.begin(builder);
|
||||||
break;
|
break;
|
||||||
case RecyclerView.SCROLL_STATE_IDLE:
|
case RecyclerView.SCROLL_STATE_IDLE:
|
||||||
mMonitor.end(CUJ_SETTINGS_PAGE_SCROLL);
|
mMonitor.end(CUJ_SETTINGS_PAGE_SCROLL);
|
||||||
|
Reference in New Issue
Block a user