summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Michał Brzeziński <brzezinski@google.com> 2022-10-31 17:07:12 +0000
committer Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com> 2022-10-31 17:07:12 +0000
commitca6e9237ef7366aa2ba2f3f1086709f6f3de08cc (patch)
tree2f5de4d0e236c7dadd023f4ea860ced215d66c74
parent16a203ee23cab74c85eefd6c906dd6ae272c15db (diff)
parentd3b131a3740bfcd13bbec33ff2771eb206225513 (diff)
Merge "Fixing SysUI reporting expanded split shade state to launcher" into tm-qpr-dev am: 625756bee7 am: d3b131a374
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/20299745 Change-Id: Ic295cdafe4b9dcb95a61aafaa14555b7375a5272 Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
-rw-r--r--packages/SystemUI/src/com/android/systemui/shade/NotificationPanelViewController.java2
-rw-r--r--packages/SystemUI/tests/src/com/android/systemui/shade/NotificationPanelViewControllerTest.java9
2 files changed, 10 insertions, 1 deletions
diff --git a/packages/SystemUI/src/com/android/systemui/shade/NotificationPanelViewController.java b/packages/SystemUI/src/com/android/systemui/shade/NotificationPanelViewController.java
index 1c0f05745280..454f18539f0c 100644
--- a/packages/SystemUI/src/com/android/systemui/shade/NotificationPanelViewController.java
+++ b/packages/SystemUI/src/com/android/systemui/shade/NotificationPanelViewController.java
@@ -5035,7 +5035,7 @@ public final class NotificationPanelViewController {
}
public boolean isFullyExpanded() {
- return mExpandedHeight >= getMaxPanelHeight();
+ return mExpandedHeight >= getMaxPanelTransitionDistance();
}
public boolean isFullyCollapsed() {
diff --git a/packages/SystemUI/tests/src/com/android/systemui/shade/NotificationPanelViewControllerTest.java b/packages/SystemUI/tests/src/com/android/systemui/shade/NotificationPanelViewControllerTest.java
index ac4dd49208c2..89c5e59dfb8f 100644
--- a/packages/SystemUI/tests/src/com/android/systemui/shade/NotificationPanelViewControllerTest.java
+++ b/packages/SystemUI/tests/src/com/android/systemui/shade/NotificationPanelViewControllerTest.java
@@ -1680,6 +1680,15 @@ public class NotificationPanelViewControllerTest extends SysuiTestCase {
inOrder.verify(mNotificationStackScrollLayoutController).onExpansionStopped();
}
+ @Test
+ public void inUnlockedSplitShade_transitioningMaxTransitionDistance_makesShadeFullyExpanded() {
+ mStatusBarStateController.setState(SHADE);
+ enableSplitShade(true);
+ int transitionDistance = mNotificationPanelViewController.getMaxPanelTransitionDistance();
+ mNotificationPanelViewController.setExpandedHeight(transitionDistance);
+ assertThat(mNotificationPanelViewController.isFullyExpanded()).isTrue();
+ }
+
private static MotionEvent createMotionEvent(int x, int y, int action) {
return MotionEvent.obtain(
/* downTime= */ 0, /* eventTime= */ 0, action, x, y, /* metaState= */ 0);