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

Commit 3a58b526 authored by Anton Potapov's avatar Anton Potapov Committed by Android (Google) Code Review
Browse files

Merge "Add missing Kosmos providers for all the new Volume Dialog components" into main

parents 284d0ce0 51e2dc56
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -20,5 +20,5 @@ import com.android.settingslib.notification.data.repository.FakeZenModeRepositor
import com.android.systemui.kosmos.Kosmos
import com.android.systemui.kosmos.Kosmos.Fixture

val Kosmos.zenModeRepository by Fixture { fakeZenModeRepository }
var Kosmos.zenModeRepository by Fixture { fakeZenModeRepository }
val Kosmos.fakeZenModeRepository by Fixture { FakeZenModeRepository() }
+1 −1
Original line number Diff line number Diff line
@@ -39,7 +39,7 @@ val Kosmos.localMediaRepositoryFactory by

val Kosmos.mediaOutputActionsInteractor by
    Kosmos.Fixture { MediaOutputActionsInteractor(mediaOutputDialogManager) }
val Kosmos.mediaControllerRepository by Kosmos.Fixture { FakeMediaControllerRepository() }
var Kosmos.mediaControllerRepository by Kosmos.Fixture { FakeMediaControllerRepository() }
val Kosmos.mediaOutputInteractor by
    Kosmos.Fixture {
        MediaOutputInteractor(
+1 −1
Original line number Diff line number Diff line
@@ -19,4 +19,4 @@ package com.android.systemui.volume.data.repository
import com.android.systemui.kosmos.Kosmos

val Kosmos.fakeAudioRepository by Kosmos.Fixture { FakeAudioRepository() }
val Kosmos.audioRepository by Kosmos.Fixture { fakeAudioRepository }
var Kosmos.audioRepository by Kosmos.Fixture { fakeAudioRepository }
+31 −0
Original line number Diff line number Diff line
/*
 * Copyright (C) 2024 The Android Open Source Project
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package com.android.systemui.volume.dialog

import android.content.applicationContext
import com.android.systemui.kosmos.Kosmos
import com.android.systemui.volume.dialog.dagger.volumeDialogComponentFactory
import com.android.systemui.volume.dialog.domain.interactor.volumeDialogVisibilityInteractor

val Kosmos.volumeDialog by
    Kosmos.Fixture {
        VolumeDialog(
            context = applicationContext,
            visibilityInteractor = volumeDialogVisibilityInteractor,
            componentFactory = volumeDialogComponentFactory,
        )
    }
+41 −0
Original line number Diff line number Diff line
/*
 * Copyright (C) 2024 The Android Open Source Project
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package com.android.systemui.volume.dialog.dagger

import com.android.systemui.kosmos.Kosmos
import com.android.systemui.volume.dialog.sliders.dagger.VolumeDialogSliderComponent
import com.android.systemui.volume.dialog.sliders.dagger.volumeDialogSliderComponentFactory
import com.android.systemui.volume.dialog.ui.binder.VolumeDialogViewBinder
import com.android.systemui.volume.dialog.ui.binder.volumeDialogViewBinder
import kotlinx.coroutines.CoroutineScope

val Kosmos.volumeDialogComponentFactory by
    Kosmos.Fixture {
        object : VolumeDialogComponent.Factory {
            override fun create(scope: CoroutineScope): VolumeDialogComponent =
                volumeDialogComponent
        }
    }
val Kosmos.volumeDialogComponent by
    Kosmos.Fixture {
        object : VolumeDialogComponent {
            override fun volumeDialogViewBinder(): VolumeDialogViewBinder = volumeDialogViewBinder

            override fun sliderComponentFactory(): VolumeDialogSliderComponent.Factory =
                volumeDialogSliderComponentFactory
        }
    }
Loading