Merge "Add SETTINGS_SLIDER CUJ to InteractionJankMonitor" into tm-dev

This commit is contained in:
Chaohui Wang
2022-05-04 02:23:14 +00:00
committed by Android (Google) Code Review
2 changed files with 19 additions and 1 deletions

View File

@@ -68,9 +68,18 @@ public class SeekBarVolumizer implements OnSeekBarChangeListener, Handler.Callba
void onMuted(boolean muted, boolean zenMuted); void onMuted(boolean muted, boolean zenMuted);
/** /**
* Callback reporting that the seek bar is start tracking. * Callback reporting that the seek bar is start tracking.
*
* @param sbv - The seek bar that start tracking * @param sbv - The seek bar that start tracking
*/ */
void onStartTrackingTouch(SeekBarVolumizer sbv); void onStartTrackingTouch(SeekBarVolumizer sbv);
/**
* Callback reporting that the seek bar is stop tracking.
*
* @param sbv - The seek bar that stop tracking
*/
default void onStopTrackingTouch(SeekBarVolumizer sbv) {
}
} }
private static final int MSG_GROUP_VOLUME_CHANGED = 1; private static final int MSG_GROUP_VOLUME_CHANGED = 1;
@@ -451,6 +460,9 @@ public class SeekBarVolumizer implements OnSeekBarChangeListener, Handler.Callba
public void onStopTrackingTouch(SeekBar seekBar) { public void onStopTrackingTouch(SeekBar seekBar) {
postStartSample(); postStartSample();
if (mCallback != null) {
mCallback.onStopTrackingTouch(this);
}
} }
public boolean isSamplePlaying() { public boolean isSamplePlaying() {

View File

@@ -45,6 +45,7 @@ import static com.android.internal.util.FrameworkStatsLog.UIINTERACTION_FRAME_IN
import static com.android.internal.util.FrameworkStatsLog.UIINTERACTION_FRAME_INFO_REPORTED__INTERACTION_TYPE__SCREEN_OFF; import static com.android.internal.util.FrameworkStatsLog.UIINTERACTION_FRAME_INFO_REPORTED__INTERACTION_TYPE__SCREEN_OFF;
import static com.android.internal.util.FrameworkStatsLog.UIINTERACTION_FRAME_INFO_REPORTED__INTERACTION_TYPE__SCREEN_OFF_SHOW_AOD; import static com.android.internal.util.FrameworkStatsLog.UIINTERACTION_FRAME_INFO_REPORTED__INTERACTION_TYPE__SCREEN_OFF_SHOW_AOD;
import static com.android.internal.util.FrameworkStatsLog.UIINTERACTION_FRAME_INFO_REPORTED__INTERACTION_TYPE__SETTINGS_PAGE_SCROLL; import static com.android.internal.util.FrameworkStatsLog.UIINTERACTION_FRAME_INFO_REPORTED__INTERACTION_TYPE__SETTINGS_PAGE_SCROLL;
import static com.android.internal.util.FrameworkStatsLog.UIINTERACTION_FRAME_INFO_REPORTED__INTERACTION_TYPE__SETTINGS_SLIDER;
import static com.android.internal.util.FrameworkStatsLog.UIINTERACTION_FRAME_INFO_REPORTED__INTERACTION_TYPE__SHADE_APP_LAUNCH; import static com.android.internal.util.FrameworkStatsLog.UIINTERACTION_FRAME_INFO_REPORTED__INTERACTION_TYPE__SHADE_APP_LAUNCH;
import static com.android.internal.util.FrameworkStatsLog.UIINTERACTION_FRAME_INFO_REPORTED__INTERACTION_TYPE__SHADE_APP_LAUNCH_FROM_HISTORY_BUTTON; import static com.android.internal.util.FrameworkStatsLog.UIINTERACTION_FRAME_INFO_REPORTED__INTERACTION_TYPE__SHADE_APP_LAUNCH_FROM_HISTORY_BUTTON;
import static com.android.internal.util.FrameworkStatsLog.UIINTERACTION_FRAME_INFO_REPORTED__INTERACTION_TYPE__SHADE_APP_LAUNCH_FROM_MEDIA_PLAYER; import static com.android.internal.util.FrameworkStatsLog.UIINTERACTION_FRAME_INFO_REPORTED__INTERACTION_TYPE__SHADE_APP_LAUNCH_FROM_MEDIA_PLAYER;
@@ -192,6 +193,7 @@ public class InteractionJankMonitor {
public static final int CUJ_SPLIT_SCREEN_EXIT = 50; public static final int CUJ_SPLIT_SCREEN_EXIT = 50;
public static final int CUJ_LOCKSCREEN_LAUNCH_CAMERA = 51; // reserved. public static final int CUJ_LOCKSCREEN_LAUNCH_CAMERA = 51; // reserved.
public static final int CUJ_SPLIT_SCREEN_RESIZE = 52; public static final int CUJ_SPLIT_SCREEN_RESIZE = 52;
public static final int CUJ_SETTINGS_SLIDER = 53;
private static final int NO_STATSD_LOGGING = -1; private static final int NO_STATSD_LOGGING = -1;
@@ -253,6 +255,7 @@ public class InteractionJankMonitor {
UIINTERACTION_FRAME_INFO_REPORTED__INTERACTION_TYPE__SPLIT_SCREEN_EXIT, UIINTERACTION_FRAME_INFO_REPORTED__INTERACTION_TYPE__SPLIT_SCREEN_EXIT,
UIINTERACTION_FRAME_INFO_REPORTED__INTERACTION_TYPE__LOCKSCREEN_LAUNCH_CAMERA, UIINTERACTION_FRAME_INFO_REPORTED__INTERACTION_TYPE__LOCKSCREEN_LAUNCH_CAMERA,
UIINTERACTION_FRAME_INFO_REPORTED__INTERACTION_TYPE__SPLIT_SCREEN_RESIZE, UIINTERACTION_FRAME_INFO_REPORTED__INTERACTION_TYPE__SPLIT_SCREEN_RESIZE,
UIINTERACTION_FRAME_INFO_REPORTED__INTERACTION_TYPE__SETTINGS_SLIDER,
}; };
private static volatile InteractionJankMonitor sInstance; private static volatile InteractionJankMonitor sInstance;
@@ -325,7 +328,8 @@ public class InteractionJankMonitor {
CUJ_SPLIT_SCREEN_ENTER, CUJ_SPLIT_SCREEN_ENTER,
CUJ_SPLIT_SCREEN_EXIT, CUJ_SPLIT_SCREEN_EXIT,
CUJ_LOCKSCREEN_LAUNCH_CAMERA, CUJ_LOCKSCREEN_LAUNCH_CAMERA,
CUJ_SPLIT_SCREEN_RESIZE CUJ_SPLIT_SCREEN_RESIZE,
CUJ_SETTINGS_SLIDER,
}) })
@Retention(RetentionPolicy.SOURCE) @Retention(RetentionPolicy.SOURCE)
public @interface CujType { public @interface CujType {
@@ -750,6 +754,8 @@ public class InteractionJankMonitor {
return "CUJ_LOCKSCREEN_LAUNCH_CAMERA"; return "CUJ_LOCKSCREEN_LAUNCH_CAMERA";
case CUJ_SPLIT_SCREEN_RESIZE: case CUJ_SPLIT_SCREEN_RESIZE:
return "CUJ_SPLIT_SCREEN_RESIZE"; return "CUJ_SPLIT_SCREEN_RESIZE";
case CUJ_SETTINGS_SLIDER:
return "SETTINGS_SLIDER";
} }
return "UNKNOWN"; return "UNKNOWN";
} }