summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Justin Weir <justinweir@google.com> 2024-03-08 11:13:17 -0500
committer Justin Weir <justinweir@google.com> 2024-03-08 11:28:43 -0500
commit2633c06a3a030e851d41a09d7c37f52df1ea0266 (patch)
treefef98b49d91ee464826688f80788dff7540094a3
parent455dd739f21ef8862f241eb36e0290d43fb4107d (diff)
Delete methods from ShadeViewController
All calls are either called directly against a specific implementation or can be replace by calls to ShadeController. Flag: ACONFIG com.android.systemui.scene_container DEVELOPMENT Test: Updated and ran affected test Bug: 303267342 Change-Id: Idb840f9d23369b0018dac9105b9cb9a20e9ae98c
-rw-r--r--packages/SystemUI/src/com/android/systemui/shade/NotificationPanelViewController.java4
-rw-r--r--packages/SystemUI/src/com/android/systemui/shade/ShadeViewController.kt19
-rw-r--r--packages/SystemUI/src/com/android/systemui/shade/ShadeViewControllerEmptyImpl.kt4
-rw-r--r--packages/SystemUI/src/com/android/systemui/statusbar/phone/CentralSurfacesCommandQueueCallbacks.java3
-rw-r--r--packages/SystemUI/src/com/android/systemui/statusbar/phone/CentralSurfacesImpl.java3
5 files changed, 2 insertions, 31 deletions
diff --git a/packages/SystemUI/src/com/android/systemui/shade/NotificationPanelViewController.java b/packages/SystemUI/src/com/android/systemui/shade/NotificationPanelViewController.java
index a1644b219063..31bbe7f1a4d4 100644
--- a/packages/SystemUI/src/com/android/systemui/shade/NotificationPanelViewController.java
+++ b/packages/SystemUI/src/com/android/systemui/shade/NotificationPanelViewController.java
@@ -1979,7 +1979,6 @@ public final class NotificationPanelViewController implements ShadeSurface, Dump
mNotificationStackScrollLayoutController.resetScrollPosition();
}
- @Override
public void collapse(boolean animate, boolean delayed, float speedUpFactor) {
boolean waiting = false;
if (animate && !isFullyCollapsed()) {
@@ -1997,7 +1996,6 @@ public final class NotificationPanelViewController implements ShadeSurface, Dump
}
}
- @Override
public void collapse(boolean delayed, float speedUpFactor) {
if (!canBeCollapsed()) {
return;
@@ -4004,7 +4002,6 @@ public final class NotificationPanelViewController implements ShadeSurface, Dump
return mExpandedHeight >= getMaxPanelTransitionDistance();
}
- @Override
public boolean isShadeFullyExpanded() {
if (mBarState == SHADE) {
return isFullyExpanded();
@@ -4035,7 +4032,6 @@ public final class NotificationPanelViewController implements ShadeSurface, Dump
return !isFullyCollapsed() && !isTracking() && !isClosing();
}
- @Override
public void instantCollapse() {
abortAnimations();
setExpandedFraction(0f);
diff --git a/packages/SystemUI/src/com/android/systemui/shade/ShadeViewController.kt b/packages/SystemUI/src/com/android/systemui/shade/ShadeViewController.kt
index 7a1637eeab15..07236d1e5ab7 100644
--- a/packages/SystemUI/src/com/android/systemui/shade/ShadeViewController.kt
+++ b/packages/SystemUI/src/com/android/systemui/shade/ShadeViewController.kt
@@ -40,25 +40,6 @@ interface ShadeViewController {
*/
val isPanelExpanded: Boolean
- /** Returns whether the shade is fully expanded in either QS or QQS. */
- val isShadeFullyExpanded: Boolean
-
- /**
- * Animates the collapse of a shade with the given delay and the default duration divided by
- * speedUpFactor.
- */
- fun collapse(delayed: Boolean, speedUpFactor: Float)
-
- /** Collapses the shade. */
- fun collapse(animate: Boolean, delayed: Boolean, speedUpFactor: Float)
-
- /** Collapses the shade instantly without animation. */
- fun instantCollapse()
-
- /** Returns whether the shade can be collapsed. */
- @Deprecated("Do not use outside of the shade package. Not supported by scenes.")
- fun canBeCollapsed(): Boolean
-
/** Returns whether the shade is in the process of collapsing. */
val isCollapsing: Boolean
diff --git a/packages/SystemUI/src/com/android/systemui/shade/ShadeViewControllerEmptyImpl.kt b/packages/SystemUI/src/com/android/systemui/shade/ShadeViewControllerEmptyImpl.kt
index 3be3f6b1441d..bca91ccf1620 100644
--- a/packages/SystemUI/src/com/android/systemui/shade/ShadeViewControllerEmptyImpl.kt
+++ b/packages/SystemUI/src/com/android/systemui/shade/ShadeViewControllerEmptyImpl.kt
@@ -32,10 +32,6 @@ class ShadeViewControllerEmptyImpl @Inject constructor() :
override val isExpandingOrCollapsing: Boolean = false
override val isExpanded: Boolean = false
override val isPanelExpanded: Boolean = false
- override val isShadeFullyExpanded: Boolean = false
- override fun collapse(delayed: Boolean, speedUpFactor: Float) {}
- override fun collapse(animate: Boolean, delayed: Boolean, speedUpFactor: Float) {}
- override fun instantCollapse() {}
override fun animateCollapseQs(fullyCollapse: Boolean) {}
override fun canBeCollapsed(): Boolean = false
override val isCollapsing: Boolean = false
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/CentralSurfacesCommandQueueCallbacks.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/CentralSurfacesCommandQueueCallbacks.java
index 48d3157b1968..e2e13a192429 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/CentralSurfacesCommandQueueCallbacks.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/CentralSurfacesCommandQueueCallbacks.java
@@ -301,8 +301,7 @@ public class CentralSurfacesCommandQueueCallbacks implements CommandQueue.Callba
if (KeyEvent.KEYCODE_SYSTEM_NAVIGATION_UP == key.getKeyCode()) {
mMetricsLogger.action(MetricsEvent.ACTION_SYSTEM_NAVIGATION_KEY_UP);
- mShadeViewController.collapse(
- false /* delayed */, 1.0f /* speedUpFactor */);
+ mShadeController.animateCollapseShade();
} else if (KeyEvent.KEYCODE_SYSTEM_NAVIGATION_DOWN == key.getKeyCode()) {
mMetricsLogger.action(MetricsEvent.ACTION_SYSTEM_NAVIGATION_KEY_DOWN);
if (mShadeViewController.isFullyCollapsed()) {
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/CentralSurfacesImpl.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/CentralSurfacesImpl.java
index db15144340e2..784d9343f7d5 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/CentralSurfacesImpl.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/CentralSurfacesImpl.java
@@ -3043,8 +3043,7 @@ public class CentralSurfacesImpl implements CoreStartable, CentralSurfaces {
if (userSetup != mUserSetup) {
mUserSetup = userSetup;
if (!mUserSetup && mState == StatusBarState.SHADE) {
- mShadeSurface.collapse(true /* animate */, false /* delayed */,
- 1.0f /* speedUpFactor */);
+ mShadeController.animateCollapseShade();
}
}
}