Merge "Ensuring QS can't collapse (hide) in split shade" into tm-qpr-dev am: 898d6d91c3
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/21009607 Change-Id: Ie025afc7479ea9d77a3c3d6ffceea2005942b10c Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
@@ -2097,7 +2097,17 @@ public final class NotificationPanelViewController implements Dumpable {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public void expandWithoutQs() {
|
/**
|
||||||
|
* Expand shade so that notifications are visible.
|
||||||
|
* Non-split shade: just expanding shade or collapsing QS when they're expanded.
|
||||||
|
* Split shade: only expanding shade, notifications are always visible
|
||||||
|
*
|
||||||
|
* Called when `adb shell cmd statusbar expand-notifications` is executed.
|
||||||
|
*/
|
||||||
|
public void expandShadeToNotifications() {
|
||||||
|
if (mSplitShadeEnabled && (isShadeFullyOpen() || isExpanding())) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
if (isQsExpanded()) {
|
if (isQsExpanded()) {
|
||||||
flingSettings(0 /* velocity */, FLING_COLLAPSE);
|
flingSettings(0 /* velocity */, FLING_COLLAPSE);
|
||||||
} else {
|
} else {
|
||||||
@@ -5536,7 +5546,7 @@ public final class NotificationPanelViewController implements Dumpable {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void flingTopOverscroll(float velocity, boolean open) {
|
public void flingTopOverscroll(float velocity, boolean open) {
|
||||||
// in split shade mode we want to expand/collapse QS only when touch happens within QS
|
// in split shade touches affect QS only when touch happens within QS
|
||||||
if (isSplitShadeAndTouchXOutsideQs(mInitialTouchX)) {
|
if (isSplitShadeAndTouchXOutsideQs(mInitialTouchX)) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -218,7 +218,7 @@ public class CentralSurfacesCommandQueueCallbacks implements CommandQueue.Callba
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
mNotificationPanelViewController.expandWithoutQs();
|
mNotificationPanelViewController.expandShadeToNotifications();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
@@ -1147,7 +1147,7 @@ public class StatusBarKeyguardViewManager implements RemoteInputController.Callb
|
|||||||
if (hideImmediately) {
|
if (hideImmediately) {
|
||||||
mStatusBarStateController.setLeaveOpenOnKeyguardHide(false);
|
mStatusBarStateController.setLeaveOpenOnKeyguardHide(false);
|
||||||
} else {
|
} else {
|
||||||
mNotificationPanelViewController.expandWithoutQs();
|
mNotificationPanelViewController.expandShadeToNotifications();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return;
|
return;
|
||||||
|
|||||||
@@ -147,7 +147,7 @@ public class CentralSurfacesCommandQueueCallbacksTest extends SysuiTestCase {
|
|||||||
|
|
||||||
// Trying to open it does nothing.
|
// Trying to open it does nothing.
|
||||||
mSbcqCallbacks.animateExpandNotificationsPanel();
|
mSbcqCallbacks.animateExpandNotificationsPanel();
|
||||||
verify(mNotificationPanelViewController, never()).expandWithoutQs();
|
verify(mNotificationPanelViewController, never()).expandShadeToNotifications();
|
||||||
mSbcqCallbacks.animateExpandSettingsPanel(null);
|
mSbcqCallbacks.animateExpandSettingsPanel(null);
|
||||||
verify(mNotificationPanelViewController, never()).expand(anyBoolean());
|
verify(mNotificationPanelViewController, never()).expand(anyBoolean());
|
||||||
}
|
}
|
||||||
@@ -165,7 +165,7 @@ public class CentralSurfacesCommandQueueCallbacksTest extends SysuiTestCase {
|
|||||||
|
|
||||||
// Can now be opened.
|
// Can now be opened.
|
||||||
mSbcqCallbacks.animateExpandNotificationsPanel();
|
mSbcqCallbacks.animateExpandNotificationsPanel();
|
||||||
verify(mNotificationPanelViewController).expandWithoutQs();
|
verify(mNotificationPanelViewController).expandShadeToNotifications();
|
||||||
mSbcqCallbacks.animateExpandSettingsPanel(null);
|
mSbcqCallbacks.animateExpandSettingsPanel(null);
|
||||||
verify(mNotificationPanelViewController).expandWithQs();
|
verify(mNotificationPanelViewController).expandWithQs();
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user