diff options
| author | 2020-11-24 08:26:50 +0000 | |
|---|---|---|
| committer | 2020-11-24 08:26:50 +0000 | |
| commit | e0c19e7fcaf170e912b7e5566617742e2b0cfee2 (patch) | |
| tree | f605ad573d91d478702e89e2f98a0297f9922ef6 | |
| parent | e8e9fe58462a8c5a692dd192a428c2c14c2420b6 (diff) | |
Add new interaction jank hook point for cuj tests
We already have some exsiting cuj tests for jank, but the hook points
are different, so also take these points into account.
Bug: 169221093
Bug: 169220995
Test: atest \
PlatformScenarioTests:android.platform.test.scenario.notification.OpenCloseNotificationShadeMicrobenchmark \
-- --test-arg \
com.android.tradefed.testtype.AndroidJUnitTest:device-listeners:android.device.collectors.UiInteractionFrameInfoListener \
--module-arg PlatformScenarioTests:instrumentation-arg:iterations:=10 \
--module-arg PlatformScenarioTests:instrumentation-arg:drop-cache:=false \
--module-arg PlatformScenarioTests:instrumentation-arg:kill-app:=false
Change-Id: I3cddb28360f9d0b62a2df8ee1d3ffbac645d73c9
2 files changed, 3 insertions, 0 deletions
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationPanelViewController.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationPanelViewController.java index f7139aa2acce..0c5ee5634f1b 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationPanelViewController.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationPanelViewController.java @@ -1112,6 +1112,7 @@ public class NotificationPanelViewController extends PanelViewController { if (isFullyCollapsed()) { expand(true /* animate */); } else { + traceQsJank(true /* startTracing */, false /* wasCancelled */); flingSettings(0 /* velocity */, FLING_EXPAND); } } diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/PanelViewController.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/PanelViewController.java index 5a01f471d0cd..8ed971087508 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/PanelViewController.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/PanelViewController.java @@ -862,6 +862,8 @@ public abstract class PanelViewController { mView.getViewTreeObserver().removeOnGlobalLayoutListener(this); if (mAnimateAfterExpanding) { notifyExpandingStarted(); + InteractionJankMonitor.getInstance().begin( + CUJ_NOTIFICATION_SHADE_EXPAND_COLLAPSE); fling(0, true /* expand */); } else { setExpandedFraction(1f); |