From ad46c022d0a3752f7ccd25eb8ffaeb7b3977be2c Mon Sep 17 00:00:00 2001 From: Ahan Wu Date: Wed, 4 Nov 2020 18:25:48 +0000 Subject: [PATCH] Refine LatencyTracker hook point for notification shade swipe The hook point of LatencyTracker for ACTION_EXPAND_PANEL seems incorrect that we got the value way off in Pitot, refine the hook point. Bug: 169646405 Test: print logs, breakpoints Change-Id: I76cbcfa78386f27741d22f5849d25de274bac590 --- .../src/com/android/systemui/recents/OverviewProxyService.java | 3 ++- .../statusbar/phone/NotificationShadeWindowViewController.java | 3 --- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/packages/SystemUI/src/com/android/systemui/recents/OverviewProxyService.java b/packages/SystemUI/src/com/android/systemui/recents/OverviewProxyService.java index ddf30ad663ddf..c27b0473f16c5 100644 --- a/packages/SystemUI/src/com/android/systemui/recents/OverviewProxyService.java +++ b/packages/SystemUI/src/com/android/systemui/recents/OverviewProxyService.java @@ -207,8 +207,9 @@ public class OverviewProxyService extends CurrentUserTracker implements try { // TODO move this logic to message queue mStatusBarOptionalLazy.ifPresent(statusBarLazy -> { + StatusBar statusBar = statusBarLazy.get(); + statusBar.getPanelController().startExpandLatencyTracking(); mHandler.post(()-> { - StatusBar statusBar = statusBarLazy.get(); int action = event.getActionMasked(); if (action == ACTION_DOWN) { mInputFocusTransferStarted = true; diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationShadeWindowViewController.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationShadeWindowViewController.java index a3d3c2bb0af5f..3db3ab5a56c8a 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationShadeWindowViewController.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationShadeWindowViewController.java @@ -224,9 +224,6 @@ public class NotificationShadeWindowViewController { if (!isCancel && mService.shouldIgnoreTouch()) { return false; } - if (isDown && mNotificationPanelViewController.isFullyCollapsed()) { - mNotificationPanelViewController.startExpandLatencyTracking(); - } if (isDown) { setTouchActive(true); mTouchCancelled = false;