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

Commit dce03dec authored by Jeff DeCew's avatar Jeff DeCew Committed by Android (Google) Code Review
Browse files

Merge "Start using @AssistedFactory in Notifications"

parents 85949672 9d058cc0
Loading
Loading
Loading
Loading
+12 −20
Original line number Diff line number Diff line
@@ -24,16 +24,18 @@ import com.android.systemui.statusbar.notification.collection.ListEntry
import com.android.systemui.statusbar.notification.collection.NotificationEntry
import com.android.systemui.statusbar.notification.stack.NotificationListContainer
import com.android.systemui.util.traceSection
import javax.inject.Inject
import dagger.assisted.Assisted
import dagger.assisted.AssistedFactory
import dagger.assisted.AssistedInject

/**
 * Responsible for building and applying the "shade node spec": the list (tree) of things that
 * currently populate the notification shade.
 */
class ShadeViewManager constructor(
class ShadeViewManager @AssistedInject constructor(
    context: Context,
    listContainer: NotificationListContainer,
    private val stackController: NotifStackController,
    @Assisted listContainer: NotificationListContainer,
    @Assisted private val stackController: NotifStackController,
    mediaContainerController: MediaContainerController,
    featureManager: NotificationSectionsFeatureManager,
    logger: ShadeViewDifferLogger,
@@ -68,20 +70,10 @@ class ShadeViewManager constructor(
    }
}

class ShadeViewManagerFactory @Inject constructor(
    private val context: Context,
    private val logger: ShadeViewDifferLogger,
    private val mediaContainerController: MediaContainerController,
    private val sectionsFeatureManager: NotificationSectionsFeatureManager,
    private val viewBarn: NotifViewBarn
) {
    fun create(listContainer: NotificationListContainer, stackController: NotifStackController) =
        ShadeViewManager(
            context,
            listContainer,
            stackController,
            mediaContainerController,
            sectionsFeatureManager,
            logger,
            viewBarn)
@AssistedFactory
interface ShadeViewManagerFactory {
    fun create(
        listContainer: NotificationListContainer,
        stackController: NotifStackController
    ): ShadeViewManager
}