Making sure QS are not closed when split shade is open
1. Checking that we can actually close QS, that is we're really closing shade 2. Logging when we're forcing closing QS in split shade 3. Removing unnecessary call to closeQS from ShadeControllerImpl - "collapsePanel" already tries closing QS anyway Fixes: 264558771 Bug: 219589379 Test: In full screen app try swiping split shade up and when it disappears - without lifting finger from screen - swipe quickly down Change-Id: Icc6899018e0815e4729bcefd02163a5a9cfec022
This commit is contained in:
@@ -1777,7 +1777,7 @@ public final class NotificationPanelViewController implements Dumpable {
|
||||
if (animate && !isFullyCollapsed()) {
|
||||
animateCloseQs(true);
|
||||
} else {
|
||||
mQsController.closeQs();
|
||||
closeQsIfPossible();
|
||||
}
|
||||
mNotificationStackScrollLayoutController.setOverScrollAmount(0f, true /* onTop */, animate,
|
||||
!animate /* cancelAnimators */);
|
||||
@@ -4020,9 +4020,17 @@ public final class NotificationPanelViewController implements Dumpable {
|
||||
return mExpandingFromHeadsUp;
|
||||
}
|
||||
|
||||
/** TODO: remove need for this delegate (b/254870148) */
|
||||
public void closeQs() {
|
||||
mQsController.closeQs();
|
||||
/**
|
||||
* We don't always want to close QS when requested as shade might be in a different state
|
||||
* already e.g. when going from collapse to expand very quickly. In that case StatusBar
|
||||
* window might send signal to collapse QS but we might be already expanding and in split
|
||||
* shade QS are always expanded
|
||||
*/
|
||||
private void closeQsIfPossible() {
|
||||
boolean openOrOpening = isShadeFullyOpen() || isExpanding();
|
||||
if (!(mSplitShadeEnabled && openOrOpening)) {
|
||||
mQsController.closeQs();
|
||||
}
|
||||
}
|
||||
|
||||
/** TODO: remove need for this delegate (b/254870148) */
|
||||
|
||||
@@ -663,8 +663,15 @@ public class QuickSettingsController {
|
||||
mDozing = dozing;
|
||||
}
|
||||
|
||||
/** set QS state to closed */
|
||||
/**
|
||||
* This method closes QS but in split shade it should be used only in special cases: to make
|
||||
* sure QS closes when shade is closed as well. Otherwise it will result in QS disappearing
|
||||
* from split shade
|
||||
*/
|
||||
public void closeQs() {
|
||||
if (mSplitShadeEnabled) {
|
||||
mShadeLog.d("Closing QS while in split shade");
|
||||
}
|
||||
cancelExpansionAnimation();
|
||||
setExpansionHeight(getMinExpansionHeight());
|
||||
// qsExpandImmediate is a safety latch in case we're calling closeQS while we're in the
|
||||
|
||||
@@ -270,8 +270,6 @@ public final class ShadeControllerImpl implements ShadeController {
|
||||
// Ensure the panel is fully collapsed (just in case; bug 6765842, 7260868)
|
||||
mNotificationPanelViewController.collapsePanel(false, false, 1.0f);
|
||||
|
||||
mNotificationPanelViewController.closeQs();
|
||||
|
||||
mExpandedVisible = false;
|
||||
notifyVisibilityChanged(false);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user