Instrument CUJ_SHADE_CLEAR_ALL with InteractionJankMonitor
In NotificationStackScrollLayout - Begin instrument in clearNotifications() - End in onClearAllAnimationsEnd() Note: due to all child views run clear anim concurrently, we just monitor parent(NSSL). Bug: 238863970 Test: atest SystemUITests Test: make and get perfetto trace Change-Id: I705d03357a5a458a7f9eae5ecc5c4cfd7811cf7c
This commit is contained in:
@@ -53,6 +53,7 @@ import static com.android.internal.util.FrameworkStatsLog.UIINTERACTION_FRAME_IN
|
||||
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_QS_TILE;
|
||||
import static com.android.internal.util.FrameworkStatsLog.UIINTERACTION_FRAME_INFO_REPORTED__INTERACTION_TYPE__SHADE_APP_LAUNCH_FROM_SETTINGS_BUTTON;
|
||||
import static com.android.internal.util.FrameworkStatsLog.UIINTERACTION_FRAME_INFO_REPORTED__INTERACTION_TYPE__SHADE_CLEAR_ALL;
|
||||
import static com.android.internal.util.FrameworkStatsLog.UIINTERACTION_FRAME_INFO_REPORTED__INTERACTION_TYPE__SHADE_DIALOG_OPEN;
|
||||
import static com.android.internal.util.FrameworkStatsLog.UIINTERACTION_FRAME_INFO_REPORTED__INTERACTION_TYPE__SHADE_EXPAND_COLLAPSE_LOCK;
|
||||
import static com.android.internal.util.FrameworkStatsLog.UIINTERACTION_FRAME_INFO_REPORTED__INTERACTION_TYPE__SHADE_HEADS_UP_APPEAR;
|
||||
@@ -210,6 +211,7 @@ public class InteractionJankMonitor {
|
||||
public static final int CUJ_USER_DIALOG_OPEN = 59;
|
||||
public static final int CUJ_TASKBAR_EXPAND = 60;
|
||||
public static final int CUJ_TASKBAR_COLLAPSE = 61;
|
||||
public static final int CUJ_SHADE_CLEAR_ALL = 62;
|
||||
|
||||
private static final int NO_STATSD_LOGGING = -1;
|
||||
|
||||
@@ -280,6 +282,7 @@ public class InteractionJankMonitor {
|
||||
UIINTERACTION_FRAME_INFO_REPORTED__INTERACTION_TYPE__USER_DIALOG_OPEN,
|
||||
UIINTERACTION_FRAME_INFO_REPORTED__INTERACTION_TYPE__TASKBAR_EXPAND,
|
||||
UIINTERACTION_FRAME_INFO_REPORTED__INTERACTION_TYPE__TASKBAR_COLLAPSE,
|
||||
UIINTERACTION_FRAME_INFO_REPORTED__INTERACTION_TYPE__SHADE_CLEAR_ALL,
|
||||
};
|
||||
|
||||
private static volatile InteractionJankMonitor sInstance;
|
||||
@@ -361,7 +364,8 @@ public class InteractionJankMonitor {
|
||||
CUJ_SHADE_DIALOG_OPEN,
|
||||
CUJ_USER_DIALOG_OPEN,
|
||||
CUJ_TASKBAR_EXPAND,
|
||||
CUJ_TASKBAR_COLLAPSE
|
||||
CUJ_TASKBAR_COLLAPSE,
|
||||
CUJ_SHADE_CLEAR_ALL
|
||||
})
|
||||
@Retention(RetentionPolicy.SOURCE)
|
||||
public @interface CujType {
|
||||
@@ -804,6 +808,8 @@ public class InteractionJankMonitor {
|
||||
return "TASKBAR_EXPAND";
|
||||
case CUJ_TASKBAR_COLLAPSE:
|
||||
return "TASKBAR_COLLAPSE";
|
||||
case CUJ_SHADE_CLEAR_ALL:
|
||||
return "SHADE_CLEAR_ALL";
|
||||
}
|
||||
return "UNKNOWN";
|
||||
}
|
||||
|
||||
@@ -17,6 +17,7 @@
|
||||
package com.android.systemui.statusbar.notification.stack;
|
||||
|
||||
import static com.android.internal.jank.InteractionJankMonitor.CUJ_NOTIFICATION_SHADE_SCROLL_FLING;
|
||||
import static com.android.internal.jank.InteractionJankMonitor.CUJ_SHADE_CLEAR_ALL;
|
||||
import static com.android.systemui.statusbar.notification.stack.NotificationPriorityBucketKt.BUCKET_SILENT;
|
||||
import static com.android.systemui.statusbar.notification.stack.StackStateAnimator.ANIMATION_DURATION_SWIPE;
|
||||
import static com.android.systemui.util.DumpUtilsKt.println;
|
||||
@@ -5246,6 +5247,7 @@ public class NotificationStackScrollLayout extends ViewGroup implements Dumpable
|
||||
setClearAllInProgress(true);
|
||||
mShadeNeedsToClose = closeShade;
|
||||
|
||||
InteractionJankMonitor.getInstance().begin(this, CUJ_SHADE_CLEAR_ALL);
|
||||
// Decrease the delay for every row we animate to give the sense of
|
||||
// accelerating the swipes
|
||||
final int rowDelayDecrement = 5;
|
||||
@@ -6158,6 +6160,7 @@ public class NotificationStackScrollLayout extends ViewGroup implements Dumpable
|
||||
private void onClearAllAnimationsEnd(
|
||||
List<ExpandableNotificationRow> viewsToRemove,
|
||||
@SelectedRows int selectedRows) {
|
||||
InteractionJankMonitor.getInstance().end(CUJ_SHADE_CLEAR_ALL);
|
||||
if (mClearAllAnimationListener != null) {
|
||||
mClearAllAnimationListener.onAnimationEnd(viewsToRemove, selectedRows);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user