summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSteve Elliott <steell@google.com>2022-07-20 03:05:42 +0000
committerAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>2022-07-20 03:05:42 +0000
commita05392eed097e5d3836d16d9ddd3a2ec7203647d (patch)
tree9d4bad153450cbf3df5b832daed7077b2399dc93
parentc32877eceaaeeb64beb0fea5927dce1634ad81b6 (diff)
parentedb497c9bfb48b2a3b5843abe8959e3092ae217a (diff)
downloadbase-a05392eed097e5d3836d16d9ddd3a2ec7203647d.tar.gz
Merge changes Ie8ddf1db,Ice6de114 into tm-dev am: edb497c9bf
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/19065708 Change-Id: Ie846587380f7fd4047aa5cfcc8cd62703231c262 Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
-rw-r--r--packages/SystemUI/src/com/android/systemui/statusbar/phone/PanelViewController.java4
-rw-r--r--packages/SystemUI/tests/src/com/android/systemui/statusbar/phone/NotificationPanelViewControllerTest.java15
2 files changed, 16 insertions, 3 deletions
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 82ca842d48c9..5d417e0b59e2 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/PanelViewController.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/PanelViewController.java
@@ -599,9 +599,7 @@ public abstract class PanelViewController {
float collapseSpeedUpFactor, boolean expandBecauseOfFalsing) {
if (target == mExpandedHeight && mOverExpansion == 0.0f) {
// We're at the target and didn't fling and there's no overshoot
- endJankMonitoring(CUJ_NOTIFICATION_SHADE_EXPAND_COLLAPSE);
- mKeyguardStateController.notifyPanelFlingEnd();
- notifyExpandingFinished();
+ onFlingEnd(false /* cancelled */);
return;
}
mIsFlinging = true;
diff --git a/packages/SystemUI/tests/src/com/android/systemui/statusbar/phone/NotificationPanelViewControllerTest.java b/packages/SystemUI/tests/src/com/android/systemui/statusbar/phone/NotificationPanelViewControllerTest.java
index d47644f047a2..8900d8ff9fda 100644
--- a/packages/SystemUI/tests/src/com/android/systemui/statusbar/phone/NotificationPanelViewControllerTest.java
+++ b/packages/SystemUI/tests/src/com/android/systemui/statusbar/phone/NotificationPanelViewControllerTest.java
@@ -986,6 +986,21 @@ public class NotificationPanelViewControllerTest extends SysuiTestCase {
}
@Test
+ public void testSwipe_exactlyToTarget_notifiesNssl() {
+ // No over-expansion
+ mNotificationPanelViewController.setOverExpansion(0f);
+ // Fling to a target that is equal to the current position (i.e. a no-op fling).
+ mNotificationPanelViewController.flingToHeight(
+ 0f,
+ true,
+ mNotificationPanelViewController.mExpandedHeight,
+ 1f,
+ false);
+ // Verify that the NSSL is notified that the panel is *not* flinging.
+ verify(mNotificationStackScrollLayoutController).setPanelFlinging(false);
+ }
+
+ @Test
public void testDoubleTapRequired_Keyguard() {
FalsingManager.FalsingTapListener listener = getFalsingTapListener();
mStatusBarStateController.setState(KEYGUARD);