Merge "Fixing SysUI reporting expanded split shade state to launcher" into tm-qpr-dev am: 625756bee7
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/20299745 Change-Id: I8f604d1f4c8a806aa0e27506e0574b9a1b447ecf Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
@@ -5035,7 +5035,7 @@ public final class NotificationPanelViewController {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public boolean isFullyExpanded() {
|
public boolean isFullyExpanded() {
|
||||||
return mExpandedHeight >= getMaxPanelHeight();
|
return mExpandedHeight >= getMaxPanelTransitionDistance();
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean isFullyCollapsed() {
|
public boolean isFullyCollapsed() {
|
||||||
|
|||||||
@@ -1680,6 +1680,15 @@ public class NotificationPanelViewControllerTest extends SysuiTestCase {
|
|||||||
inOrder.verify(mNotificationStackScrollLayoutController).onExpansionStopped();
|
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) {
|
private static MotionEvent createMotionEvent(int x, int y, int action) {
|
||||||
return MotionEvent.obtain(
|
return MotionEvent.obtain(
|
||||||
/* downTime= */ 0, /* eventTime= */ 0, action, x, y, /* metaState= */ 0);
|
/* downTime= */ 0, /* eventTime= */ 0, action, x, y, /* metaState= */ 0);
|
||||||
|
|||||||
Reference in New Issue
Block a user