diff options
| author | 2023-09-05 15:45:11 +0000 | |
|---|---|---|
| committer | 2023-09-05 18:00:31 +0000 | |
| commit | 5b71f779d699a38d65fef5285b4a28732db0e91c (patch) | |
| tree | 9a6badacad520b8ab0c651a03198679b3cdac663 | |
| parent | bf3c622e4c5f90ae85cc6248283c625eb9ee060b (diff) | |
[SB] Remove CUJ tracking opening the shade from the status bar.
Bug: 279764677
Bug: 296397502
Test: compiles
Change-Id: I9ba5905889a92907ed294d9ed6590973eb4c8ad6
6 files changed, 1 insertions, 53 deletions
diff --git a/core/java/com/android/internal/jank/InteractionJankMonitor.java b/core/java/com/android/internal/jank/InteractionJankMonitor.java index 1ed06b4eac3e..1bfb51cc4b82 100644 --- a/core/java/com/android/internal/jank/InteractionJankMonitor.java +++ b/core/java/com/android/internal/jank/InteractionJankMonitor.java @@ -70,7 +70,6 @@ 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_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_FROM_STATUS_BAR; import static com.android.internal.util.FrameworkStatsLog.UIINTERACTION_FRAME_INFO_REPORTED__INTERACTION_TYPE__SHADE_HEADS_UP_APPEAR; import static com.android.internal.util.FrameworkStatsLog.UIINTERACTION_FRAME_INFO_REPORTED__INTERACTION_TYPE__SHADE_HEADS_UP_DISAPPEAR; import static com.android.internal.util.FrameworkStatsLog.UIINTERACTION_FRAME_INFO_REPORTED__INTERACTION_TYPE__SHADE_NOTIFICATION_ADD; @@ -269,7 +268,6 @@ public class InteractionJankMonitor { * eg: Exit the app using back gesture. */ public static final int CUJ_LAUNCHER_APP_CLOSE_TO_HOME_FALLBACK = 78; - public static final int CUJ_SHADE_EXPAND_FROM_STATUS_BAR = 79; public static final int CUJ_IME_INSETS_SHOW_ANIMATION = 80; public static final int CUJ_IME_INSETS_HIDE_ANIMATION = 81; @@ -364,7 +362,7 @@ public class InteractionJankMonitor { CUJ_TO_STATSD_INTERACTION_TYPE[76] = NO_STATSD_LOGGING; CUJ_TO_STATSD_INTERACTION_TYPE[77] = NO_STATSD_LOGGING; CUJ_TO_STATSD_INTERACTION_TYPE[CUJ_LAUNCHER_APP_CLOSE_TO_HOME_FALLBACK] = UIINTERACTION_FRAME_INFO_REPORTED__INTERACTION_TYPE__LAUNCHER_APP_CLOSE_TO_HOME_FALLBACK; - CUJ_TO_STATSD_INTERACTION_TYPE[CUJ_SHADE_EXPAND_FROM_STATUS_BAR] = UIINTERACTION_FRAME_INFO_REPORTED__INTERACTION_TYPE__SHADE_EXPAND_FROM_STATUS_BAR; + CUJ_TO_STATSD_INTERACTION_TYPE[79] = NO_STATSD_LOGGING; // This is deprecated. CUJ_TO_STATSD_INTERACTION_TYPE[CUJ_IME_INSETS_SHOW_ANIMATION] = UIINTERACTION_FRAME_INFO_REPORTED__INTERACTION_TYPE__IME_INSETS_SHOW_ANIMATION; CUJ_TO_STATSD_INTERACTION_TYPE[CUJ_IME_INSETS_HIDE_ANIMATION] = UIINTERACTION_FRAME_INFO_REPORTED__INTERACTION_TYPE__IME_INSETS_HIDE_ANIMATION; CUJ_TO_STATSD_INTERACTION_TYPE[CUJ_SPLIT_SCREEN_DOUBLE_TAP_DIVIDER] = UIINTERACTION_FRAME_INFO_REPORTED__INTERACTION_TYPE__SPLIT_SCREEN_DOUBLE_TAP_DIVIDER; @@ -467,7 +465,6 @@ public class InteractionJankMonitor { CUJ_LOCKSCREEN_CLOCK_MOVE_ANIMATION, CUJ_LAUNCHER_OPEN_SEARCH_RESULT, CUJ_LAUNCHER_APP_CLOSE_TO_HOME_FALLBACK, - CUJ_SHADE_EXPAND_FROM_STATUS_BAR, CUJ_IME_INSETS_SHOW_ANIMATION, CUJ_IME_INSETS_HIDE_ANIMATION, CUJ_SPLIT_SCREEN_DOUBLE_TAP_DIVIDER, @@ -1082,8 +1079,6 @@ public class InteractionJankMonitor { return "LAUNCHER_OPEN_SEARCH_RESULT"; case CUJ_LAUNCHER_APP_CLOSE_TO_HOME_FALLBACK: return "LAUNCHER_APP_CLOSE_TO_HOME_FALLBACK"; - case CUJ_SHADE_EXPAND_FROM_STATUS_BAR: - return "SHADE_EXPAND_FROM_STATUS_BAR"; case CUJ_IME_INSETS_SHOW_ANIMATION: return "IME_INSETS_SHOW_ANIMATION"; case CUJ_IME_INSETS_HIDE_ANIMATION: diff --git a/packages/SystemUI/shared/src/com/android/systemui/shared/system/InteractionJankMonitorWrapper.java b/packages/SystemUI/shared/src/com/android/systemui/shared/system/InteractionJankMonitorWrapper.java index 77f6d03a03fb..eb2066936088 100644 --- a/packages/SystemUI/shared/src/com/android/systemui/shared/system/InteractionJankMonitorWrapper.java +++ b/packages/SystemUI/shared/src/com/android/systemui/shared/system/InteractionJankMonitorWrapper.java @@ -61,8 +61,6 @@ public final class InteractionJankMonitorWrapper { InteractionJankMonitor.CUJ_LAUNCHER_APP_SWIPE_TO_RECENTS; public static final int CUJ_OPEN_SEARCH_RESULT = InteractionJankMonitor.CUJ_LAUNCHER_OPEN_SEARCH_RESULT; - public static final int CUJ_SHADE_EXPAND_FROM_STATUS_BAR = - InteractionJankMonitor.CUJ_SHADE_EXPAND_FROM_STATUS_BAR; @IntDef({ CUJ_APP_LAUNCH_FROM_RECENTS, @@ -79,7 +77,6 @@ public final class InteractionJankMonitorWrapper { CUJ_CLOSE_ALL_APPS_SWIPE, CUJ_CLOSE_ALL_APPS_TO_HOME, CUJ_OPEN_SEARCH_RESULT, - CUJ_SHADE_EXPAND_FROM_STATUS_BAR, }) @Retention(RetentionPolicy.SOURCE) public @interface CujType { diff --git a/packages/SystemUI/src/com/android/systemui/shade/NotificationPanelViewController.java b/packages/SystemUI/src/com/android/systemui/shade/NotificationPanelViewController.java index 8db7abf7347f..2c7c55140842 100644 --- a/packages/SystemUI/src/com/android/systemui/shade/NotificationPanelViewController.java +++ b/packages/SystemUI/src/com/android/systemui/shade/NotificationPanelViewController.java @@ -164,7 +164,6 @@ import com.android.systemui.plugins.qs.QS; import com.android.systemui.plugins.statusbar.StatusBarStateController; import com.android.systemui.plugins.statusbar.StatusBarStateController.StateListener; import com.android.systemui.shade.transition.ShadeTransitionController; -import com.android.systemui.shared.system.InteractionJankMonitorWrapper; import com.android.systemui.shared.system.QuickStepContract; import com.android.systemui.statusbar.CommandQueue; import com.android.systemui.statusbar.GestureRecorder; @@ -368,7 +367,6 @@ public final class NotificationPanelViewController implements ShadeSurface, Dump /** The current squish amount for the predictive back animation */ private float mCurrentBackProgress = 0.0f; private boolean mTracking; - private boolean mIsTrackingExpansionFromStatusBar; private boolean mHintAnimationRunning; @Deprecated private KeyguardBottomAreaView mKeyguardBottomArea; @@ -2839,7 +2837,6 @@ public final class NotificationPanelViewController implements ShadeSurface, Dump private void onTrackingStopped(boolean expand) { mTracking = false; - maybeStopTrackingExpansionFromStatusBar(expand); updateExpansionAndVisibility(); if (expand) { @@ -4237,42 +4234,6 @@ public final class NotificationPanelViewController implements ShadeSurface, Dump } @Override - public void startTrackingExpansionFromStatusBar() { - mIsTrackingExpansionFromStatusBar = true; - InteractionJankMonitorWrapper.begin( - mView, InteractionJankMonitorWrapper.CUJ_SHADE_EXPAND_FROM_STATUS_BAR); - } - - /** - * Stops tracking an expansion that originated from the status bar (if we had started tracking - * it). - * - * @param expand the expand boolean passed to {@link #onTrackingStopped(boolean)}. - */ - private void maybeStopTrackingExpansionFromStatusBar(boolean expand) { - if (!mIsTrackingExpansionFromStatusBar) { - return; - } - mIsTrackingExpansionFromStatusBar = false; - - // Determine whether the shade actually expanded due to the status bar touch: - // - If the user just taps on the status bar, then #isExpanded is false but - // #onTrackingStopped is called with `true`. - // - If the user drags down on the status bar but doesn't drag down far enough, then - // #onTrackingStopped is called with `false` but #isExpanded is true. - // So, we need *both* #onTrackingStopped called with `true` *and* #isExpanded to be true in - // order to confirm that the shade successfully opened. - boolean shadeExpansionFromStatusBarSucceeded = expand && isExpanded(); - if (shadeExpansionFromStatusBarSucceeded) { - InteractionJankMonitorWrapper.end( - InteractionJankMonitorWrapper.CUJ_SHADE_EXPAND_FROM_STATUS_BAR); - } else { - InteractionJankMonitorWrapper.cancel( - InteractionJankMonitorWrapper.CUJ_SHADE_EXPAND_FROM_STATUS_BAR); - } - } - - @Override public void updateTouchableRegion() { //A layout will ensure that onComputeInternalInsets will be called and after that we can // resize the layout. Make sure that the window stays small for one frame until the diff --git a/packages/SystemUI/src/com/android/systemui/shade/ShadeViewController.kt b/packages/SystemUI/src/com/android/systemui/shade/ShadeViewController.kt index 1121834f196d..cdbea8185edd 100644 --- a/packages/SystemUI/src/com/android/systemui/shade/ShadeViewController.kt +++ b/packages/SystemUI/src/com/android/systemui/shade/ShadeViewController.kt @@ -248,9 +248,6 @@ interface ShadeViewController { /** Sends an external (e.g. Status Bar) touch event to the Shade touch handler. */ fun handleExternalTouch(event: MotionEvent): Boolean - /** Starts tracking a shade expansion gesture that originated from the status bar. */ - fun startTrackingExpansionFromStatusBar() - /** * Performs haptic feedback from a view with a haptic feedback constant. * diff --git a/packages/SystemUI/src/com/android/systemui/shade/ShadeViewControllerEmptyImpl.kt b/packages/SystemUI/src/com/android/systemui/shade/ShadeViewControllerEmptyImpl.kt index 6a2bef296b6b..189375620285 100644 --- a/packages/SystemUI/src/com/android/systemui/shade/ShadeViewControllerEmptyImpl.kt +++ b/packages/SystemUI/src/com/android/systemui/shade/ShadeViewControllerEmptyImpl.kt @@ -86,7 +86,6 @@ class ShadeViewControllerEmptyImpl @Inject constructor() : ShadeViewController { override fun handleExternalTouch(event: MotionEvent): Boolean { return false } - override fun startTrackingExpansionFromStatusBar() {} override fun performHapticFeedback(constant: Int) {} override val shadeHeadsUpTracker = ShadeHeadsUpTrackerEmptyImpl() diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBarViewController.kt b/packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBarViewController.kt index cc41bf843565..10982948eba4 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBarViewController.kt +++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBarViewController.kt @@ -198,7 +198,6 @@ class PhoneStatusBarViewController private constructor( shadeLogger.logMotionEvent(event, "top edge touch ignored") return true } - shadeViewController.startTrackingExpansionFromStatusBar() } return shadeViewController.handleExternalTouch(event) } |