Fixing SysUI reporting expanded split shade state to launcher
Split shade was not registering as being fully expanded as expanded height never reaches full shade height in that state - it reaches only maximum transition distance, so distance of swipe required for shade to fully visually expand. Fixes: 254044267 Test: NotificationPanelViewControllerTest Test: adding functional tests in ag/20299906 Change-Id: I734d82f1fc799e63d3fb0b33da780b8df572bc95
This commit is contained in:
@@ -5040,7 +5040,7 @@ public final class NotificationPanelViewController {
|
||||
}
|
||||
|
||||
public boolean isFullyExpanded() {
|
||||
return mExpandedHeight >= getMaxPanelHeight();
|
||||
return mExpandedHeight >= getMaxPanelTransitionDistance();
|
||||
}
|
||||
|
||||
public boolean isFullyCollapsed() {
|
||||
|
||||
@@ -1683,6 +1683,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);
|
||||
|
||||
Reference in New Issue
Block a user