Merge "Fixing SysUI reporting expanded split shade state to launcher" into tm-qpr-dev

This commit is contained in:
Michał Brzeziński
2022-10-31 16:32:51 +00:00
committed by Android (Google) Code Review
2 changed files with 10 additions and 1 deletions

View File

@@ -5035,7 +5035,7 @@ public final class NotificationPanelViewController {
}
public boolean isFullyExpanded() {
return mExpandedHeight >= getMaxPanelHeight();
return mExpandedHeight >= getMaxPanelTransitionDistance();
}
public boolean isFullyCollapsed() {

View File

@@ -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);