Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit ca4cb4fd authored by Justin Weir's avatar Justin Weir
Browse files

Deprecate ShadeExpansionStateManager

The original goal was to delete ShadeExpansionStateManager, but at
this point, that would require more effort and regression risk than
it's worth. The remaining usage of ShadeExpansionStateManager is in
code that will naturally be migrated or deleted by the Flexiglass
project, so spending effort to fully delete it now would be
wasteful. It is better to simply deprecate and move on.

Fixes: 269323368
Test: N/A
Flag: N/A
Change-Id: I159e8c536a2f243b0d96099a3078ab751e1e658c
parent aaf96093
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -32,6 +32,7 @@ import javax.inject.Inject
 * TODO(b/200063118): Make this class the one source of truth for the state of panel expansion.
 */
@SysUISingleton
@Deprecated("Use ShadeInteractor instead")
class ShadeExpansionStateManager @Inject constructor() {

    private val expansionListeners = CopyOnWriteArrayList<ShadeExpansionListener>()
@@ -49,6 +50,7 @@ class ShadeExpansionStateManager @Inject constructor() {
     *
     * @see #addExpansionListener
     */
    @Deprecated("Use ShadeInteractor instead")
    fun addExpansionListener(listener: ShadeExpansionListener): ShadeExpansionChangeEvent {
        expansionListeners.add(listener)
        return ShadeExpansionChangeEvent(fraction, expanded, tracking, dragDownPxAmount)
@@ -60,6 +62,7 @@ class ShadeExpansionStateManager @Inject constructor() {
    }

    /** Adds a listener that will be notified when the panel state has changed. */
    @Deprecated("Use ShadeInteractor instead")
    fun addStateListener(listener: ShadeStateListener) {
        stateListeners.add(listener)
    }