Loading packages/SystemUI/src/com/android/systemui/shade/NotificationPanelViewController.java +0 −2 Original line number Diff line number Diff line Loading @@ -3574,12 +3574,10 @@ public final class NotificationPanelViewController implements ShadeSurface, Dump ViewGroupFadeHelper.reset(mView); } @Override public void addOnGlobalLayoutListener(ViewTreeObserver.OnGlobalLayoutListener listener) { mView.getViewTreeObserver().addOnGlobalLayoutListener(listener); } @Override public void removeOnGlobalLayoutListener(ViewTreeObserver.OnGlobalLayoutListener listener) { mView.getViewTreeObserver().removeOnGlobalLayoutListener(listener); } Loading packages/SystemUI/src/com/android/systemui/shade/ShadeViewController.kt +5 −17 Original line number Diff line number Diff line Loading @@ -17,7 +17,6 @@ package com.android.systemui.shade import android.view.MotionEvent import android.view.ViewGroup import android.view.ViewTreeObserver import com.android.systemui.power.shared.model.WakefulnessModel import com.android.systemui.statusbar.notification.row.ExpandableNotificationRow import com.android.systemui.statusbar.phone.HeadsUpAppearanceController Loading @@ -26,16 +25,13 @@ import com.android.systemui.statusbar.phone.KeyguardStatusBarViewController import java.util.function.Consumer /** * Controller for the top level shade view * Controller for the top level shade view. * * @see NotificationPanelViewController */ interface ShadeViewController { /** Returns whether the shade is tracking touches for expand/collapse of the shade or QS. */ val isTracking: Boolean /** Returns whether the shade's top level view is enabled. */ val isViewEnabled: Boolean @Deprecated("No longer supported. Do not add new calls to this.") val isViewEnabled: Boolean /** Returns whether status bar icons should be hidden when the shade is expanded. */ fun shouldHideStatusBarIconsWhenExpanded(): Boolean Loading @@ -50,9 +46,6 @@ interface ShadeViewController { /** If the latency tracker is enabled, begins tracking expand latency. */ fun startExpandLatencyTracking() /** Returns the StatusBarState. */ val barState: Int /** Sets the alpha value of the shade to a value between 0 and 255. */ fun setAlpha(alpha: Int, animate: Boolean) Loading @@ -75,12 +68,6 @@ interface ShadeViewController { /** Ensures that the touchable region is updated. */ fun updateTouchableRegion() /** Adds a global layout listener. */ fun addOnGlobalLayoutListener(listener: ViewTreeObserver.OnGlobalLayoutListener) /** Removes a global layout listener. */ fun removeOnGlobalLayoutListener(listener: ViewTreeObserver.OnGlobalLayoutListener) /** * Reconfigures the shade to show the AOD UI (clock, smartspace, etc). This is called by the * screen off animation controller in order to animate in AOD without "actually" fully switching Loading @@ -105,16 +92,17 @@ interface ShadeViewController { * notification shade. After that, since the launcher window is set to slippery, input * frameworks take care of routing the events to the notification shade. */ fun startInputFocusTransfer() @Deprecated("No longer supported. Do not add new calls to this.") fun startInputFocusTransfer() /** Triggered when the input focus transfer was cancelled. */ fun cancelInputFocusTransfer() @Deprecated("No longer supported. Do not add new calls to this.") fun cancelInputFocusTransfer() /** * Triggered when the input focus transfer has finished successfully. * * @param velocity unit is in px / millis */ @Deprecated("No longer supported. Do not add new calls to this.") fun finishInputFocusTransfer(velocity: Float) /** Loading packages/SystemUI/src/com/android/systemui/shade/ShadeViewControllerEmptyImpl.kt +0 −3 Original line number Diff line number Diff line Loading @@ -18,7 +18,6 @@ package com.android.systemui.shade import android.view.MotionEvent import android.view.ViewGroup import android.view.ViewTreeObserver import com.android.systemui.shade.domain.interactor.PanelExpansionInteractor import com.android.systemui.shade.domain.interactor.ShadeBackActionInteractor import com.android.systemui.statusbar.notification.row.ExpandableNotificationRow Loading Loading @@ -65,8 +64,6 @@ class ShadeViewControllerEmptyImpl @Inject constructor() : override fun setAmbientIndicationTop(ambientIndicationTop: Int, ambientTextVisible: Boolean) {} override fun updateSystemUiStateFlags() {} override fun updateTouchableRegion() {} override fun addOnGlobalLayoutListener(listener: ViewTreeObserver.OnGlobalLayoutListener) {} override fun removeOnGlobalLayoutListener(listener: ViewTreeObserver.OnGlobalLayoutListener) {} override fun transitionToExpandedShade(delay: Long) {} @Deprecated("Not supported by scenes") override fun resetViewGroupFade() {} Loading packages/SystemUI/src/com/android/systemui/shade/domain/interactor/PanelExpansionInteractor.kt +6 −0 Original line number Diff line number Diff line Loading @@ -66,4 +66,10 @@ interface PanelExpansionInteractor { /** Returns whether the shade is in the process of collapsing. */ @Deprecated("Use ShadeAnimationInteractor instead") val isCollapsing: Boolean /** Returns whether the shade is tracking touches for expand/collapse of the shade or QS. */ @Deprecated("Use sceneInteractor.isTransitionUserInputOngoing instead") val isTracking: Boolean /** Returns the StatusBarState. Note: System UI was formerly known simply as Status Bar. */ @Deprecated("Use SceneInteractor or ShadeInteractor instead") val barState: Int } packages/SystemUI/src/com/android/systemui/shade/domain/interactor/PanelExpansionInteractorImpl.kt +26 −10 Original line number Diff line number Diff line Loading @@ -23,6 +23,7 @@ import com.android.compose.animation.scene.SceneKey import com.android.systemui.dagger.SysUISingleton import com.android.systemui.scene.domain.interactor.SceneInteractor import com.android.systemui.scene.shared.model.Scenes import com.android.systemui.statusbar.SysuiStatusBarStateController import javax.inject.Inject import kotlinx.coroutines.ExperimentalCoroutinesApi import kotlinx.coroutines.flow.Flow Loading @@ -34,9 +35,10 @@ import kotlinx.coroutines.flow.map class PanelExpansionInteractorImpl @Inject constructor( sceneInteractor: SceneInteractor, shadeInteractor: ShadeInteractor, shadeAnimationInteractor: ShadeAnimationInteractor, private val sceneInteractor: SceneInteractor, private val shadeInteractor: ShadeInteractor, private val shadeAnimationInteractor: ShadeAnimationInteractor, private val statusBarStateController: SysuiStatusBarStateController, ) : PanelExpansionInteractor { /** Loading Loading @@ -99,18 +101,32 @@ constructor( "depends on the state you check, use {@link #isShadeFullyExpanded()},\n" + "{@link #isOnAod()}, {@link #isOnKeyguard()} instead." ) override val isFullyExpanded = shadeInteractor.isAnyFullyExpanded.value override val isFullyExpanded get() = shadeInteractor.isAnyFullyExpanded.value @Deprecated("Use !ShadeInteractor.isAnyExpanded instead") override val isFullyCollapsed = !shadeInteractor.isAnyExpanded.value override val isFullyCollapsed get() = !shadeInteractor.isAnyExpanded.value @Deprecated("Use ShadeAnimationInteractor instead") override val isCollapsing = override val isCollapsing get() = shadeAnimationInteractor.isAnyCloseAnimationRunning.value || shadeAnimationInteractor.isLaunchingActivity.value @Deprecated("Use sceneInteractor.isTransitionUserInputOngoing instead") override val isTracking get() = sceneInteractor.isTransitionUserInputOngoing.value @Deprecated("Use ShadeInteractor.isAnyExpanded instead.") override val isPanelExpanded get() = shadeInteractor.isAnyExpanded.value @Deprecated("Use SceneInteractor or ShadeInteractor instead") override val barState get() = statusBarStateController.state private fun SceneKey.isExpandable(): Boolean { return this == Scenes.Shade || this == Scenes.QuickSettings } override val isPanelExpanded = shadeInteractor.isAnyExpanded.value } Loading
packages/SystemUI/src/com/android/systemui/shade/NotificationPanelViewController.java +0 −2 Original line number Diff line number Diff line Loading @@ -3574,12 +3574,10 @@ public final class NotificationPanelViewController implements ShadeSurface, Dump ViewGroupFadeHelper.reset(mView); } @Override public void addOnGlobalLayoutListener(ViewTreeObserver.OnGlobalLayoutListener listener) { mView.getViewTreeObserver().addOnGlobalLayoutListener(listener); } @Override public void removeOnGlobalLayoutListener(ViewTreeObserver.OnGlobalLayoutListener listener) { mView.getViewTreeObserver().removeOnGlobalLayoutListener(listener); } Loading
packages/SystemUI/src/com/android/systemui/shade/ShadeViewController.kt +5 −17 Original line number Diff line number Diff line Loading @@ -17,7 +17,6 @@ package com.android.systemui.shade import android.view.MotionEvent import android.view.ViewGroup import android.view.ViewTreeObserver import com.android.systemui.power.shared.model.WakefulnessModel import com.android.systemui.statusbar.notification.row.ExpandableNotificationRow import com.android.systemui.statusbar.phone.HeadsUpAppearanceController Loading @@ -26,16 +25,13 @@ import com.android.systemui.statusbar.phone.KeyguardStatusBarViewController import java.util.function.Consumer /** * Controller for the top level shade view * Controller for the top level shade view. * * @see NotificationPanelViewController */ interface ShadeViewController { /** Returns whether the shade is tracking touches for expand/collapse of the shade or QS. */ val isTracking: Boolean /** Returns whether the shade's top level view is enabled. */ val isViewEnabled: Boolean @Deprecated("No longer supported. Do not add new calls to this.") val isViewEnabled: Boolean /** Returns whether status bar icons should be hidden when the shade is expanded. */ fun shouldHideStatusBarIconsWhenExpanded(): Boolean Loading @@ -50,9 +46,6 @@ interface ShadeViewController { /** If the latency tracker is enabled, begins tracking expand latency. */ fun startExpandLatencyTracking() /** Returns the StatusBarState. */ val barState: Int /** Sets the alpha value of the shade to a value between 0 and 255. */ fun setAlpha(alpha: Int, animate: Boolean) Loading @@ -75,12 +68,6 @@ interface ShadeViewController { /** Ensures that the touchable region is updated. */ fun updateTouchableRegion() /** Adds a global layout listener. */ fun addOnGlobalLayoutListener(listener: ViewTreeObserver.OnGlobalLayoutListener) /** Removes a global layout listener. */ fun removeOnGlobalLayoutListener(listener: ViewTreeObserver.OnGlobalLayoutListener) /** * Reconfigures the shade to show the AOD UI (clock, smartspace, etc). This is called by the * screen off animation controller in order to animate in AOD without "actually" fully switching Loading @@ -105,16 +92,17 @@ interface ShadeViewController { * notification shade. After that, since the launcher window is set to slippery, input * frameworks take care of routing the events to the notification shade. */ fun startInputFocusTransfer() @Deprecated("No longer supported. Do not add new calls to this.") fun startInputFocusTransfer() /** Triggered when the input focus transfer was cancelled. */ fun cancelInputFocusTransfer() @Deprecated("No longer supported. Do not add new calls to this.") fun cancelInputFocusTransfer() /** * Triggered when the input focus transfer has finished successfully. * * @param velocity unit is in px / millis */ @Deprecated("No longer supported. Do not add new calls to this.") fun finishInputFocusTransfer(velocity: Float) /** Loading
packages/SystemUI/src/com/android/systemui/shade/ShadeViewControllerEmptyImpl.kt +0 −3 Original line number Diff line number Diff line Loading @@ -18,7 +18,6 @@ package com.android.systemui.shade import android.view.MotionEvent import android.view.ViewGroup import android.view.ViewTreeObserver import com.android.systemui.shade.domain.interactor.PanelExpansionInteractor import com.android.systemui.shade.domain.interactor.ShadeBackActionInteractor import com.android.systemui.statusbar.notification.row.ExpandableNotificationRow Loading Loading @@ -65,8 +64,6 @@ class ShadeViewControllerEmptyImpl @Inject constructor() : override fun setAmbientIndicationTop(ambientIndicationTop: Int, ambientTextVisible: Boolean) {} override fun updateSystemUiStateFlags() {} override fun updateTouchableRegion() {} override fun addOnGlobalLayoutListener(listener: ViewTreeObserver.OnGlobalLayoutListener) {} override fun removeOnGlobalLayoutListener(listener: ViewTreeObserver.OnGlobalLayoutListener) {} override fun transitionToExpandedShade(delay: Long) {} @Deprecated("Not supported by scenes") override fun resetViewGroupFade() {} Loading
packages/SystemUI/src/com/android/systemui/shade/domain/interactor/PanelExpansionInteractor.kt +6 −0 Original line number Diff line number Diff line Loading @@ -66,4 +66,10 @@ interface PanelExpansionInteractor { /** Returns whether the shade is in the process of collapsing. */ @Deprecated("Use ShadeAnimationInteractor instead") val isCollapsing: Boolean /** Returns whether the shade is tracking touches for expand/collapse of the shade or QS. */ @Deprecated("Use sceneInteractor.isTransitionUserInputOngoing instead") val isTracking: Boolean /** Returns the StatusBarState. Note: System UI was formerly known simply as Status Bar. */ @Deprecated("Use SceneInteractor or ShadeInteractor instead") val barState: Int }
packages/SystemUI/src/com/android/systemui/shade/domain/interactor/PanelExpansionInteractorImpl.kt +26 −10 Original line number Diff line number Diff line Loading @@ -23,6 +23,7 @@ import com.android.compose.animation.scene.SceneKey import com.android.systemui.dagger.SysUISingleton import com.android.systemui.scene.domain.interactor.SceneInteractor import com.android.systemui.scene.shared.model.Scenes import com.android.systemui.statusbar.SysuiStatusBarStateController import javax.inject.Inject import kotlinx.coroutines.ExperimentalCoroutinesApi import kotlinx.coroutines.flow.Flow Loading @@ -34,9 +35,10 @@ import kotlinx.coroutines.flow.map class PanelExpansionInteractorImpl @Inject constructor( sceneInteractor: SceneInteractor, shadeInteractor: ShadeInteractor, shadeAnimationInteractor: ShadeAnimationInteractor, private val sceneInteractor: SceneInteractor, private val shadeInteractor: ShadeInteractor, private val shadeAnimationInteractor: ShadeAnimationInteractor, private val statusBarStateController: SysuiStatusBarStateController, ) : PanelExpansionInteractor { /** Loading Loading @@ -99,18 +101,32 @@ constructor( "depends on the state you check, use {@link #isShadeFullyExpanded()},\n" + "{@link #isOnAod()}, {@link #isOnKeyguard()} instead." ) override val isFullyExpanded = shadeInteractor.isAnyFullyExpanded.value override val isFullyExpanded get() = shadeInteractor.isAnyFullyExpanded.value @Deprecated("Use !ShadeInteractor.isAnyExpanded instead") override val isFullyCollapsed = !shadeInteractor.isAnyExpanded.value override val isFullyCollapsed get() = !shadeInteractor.isAnyExpanded.value @Deprecated("Use ShadeAnimationInteractor instead") override val isCollapsing = override val isCollapsing get() = shadeAnimationInteractor.isAnyCloseAnimationRunning.value || shadeAnimationInteractor.isLaunchingActivity.value @Deprecated("Use sceneInteractor.isTransitionUserInputOngoing instead") override val isTracking get() = sceneInteractor.isTransitionUserInputOngoing.value @Deprecated("Use ShadeInteractor.isAnyExpanded instead.") override val isPanelExpanded get() = shadeInteractor.isAnyExpanded.value @Deprecated("Use SceneInteractor or ShadeInteractor instead") override val barState get() = statusBarStateController.state private fun SceneKey.isExpandable(): Boolean { return this == Scenes.Shade || this == Scenes.QuickSettings } override val isPanelExpanded = shadeInteractor.isAnyExpanded.value }