1 /* 2 * Copyright (C) 2024 The Android Open Source Project 3 * 4 * Licensed under the Apache License, Version 2.0 (the "License"); 5 * you may not use this file except in compliance with the License. 6 * You may obtain a copy of the License at 7 * 8 * http://www.apache.org/licenses/LICENSE-2.0 9 * 10 * Unless required by applicable law or agreed to in writing, software 11 * distributed under the License is distributed on an "AS IS" BASIS, 12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 * See the License for the specific language governing permissions and 14 * limitations under the License. 15 */ 16 17 package com.android.systemui.qs.composefragment.viewmodel 18 19 import android.content.res.mainResources 20 import androidx.lifecycle.LifecycleCoroutineScope 21 import com.android.internal.logging.uiEventLoggerFake 22 import com.android.systemui.classifier.domain.interactor.falsingInteractor 23 import com.android.systemui.common.ui.domain.interactor.configurationInteractor 24 import com.android.systemui.deviceentry.domain.interactor.deviceEntryInteractor 25 import com.android.systemui.keyguard.domain.interactor.keyguardTransitionInteractor 26 import com.android.systemui.kosmos.Kosmos 27 import com.android.systemui.log.table.logcatTableLogBuffer 28 import com.android.systemui.media.controls.ui.view.qqsMediaHost 29 import com.android.systemui.media.controls.ui.view.qsMediaHost 30 import com.android.systemui.qs.composefragment.dagger.usingMediaInComposeFragment 31 import com.android.systemui.qs.footerActionsController 32 import com.android.systemui.qs.footerActionsViewModelFactory 33 import com.android.systemui.qs.panels.domain.interactor.tileSquishinessInteractor 34 import com.android.systemui.qs.panels.ui.viewmodel.inFirstPageViewModel 35 import com.android.systemui.qs.panels.ui.viewmodel.mediaInRowInLandscapeViewModelFactory 36 import com.android.systemui.qs.ui.viewmodel.quickSettingsContainerViewModelFactory 37 import com.android.systemui.shade.domain.interactor.shadeInteractor 38 import com.android.systemui.shade.largeScreenHeaderHelper 39 import com.android.systemui.shade.transition.largeScreenShadeInterpolator 40 import com.android.systemui.statusbar.disableflags.domain.interactor.disableFlagsInteractor 41 import com.android.systemui.statusbar.sysuiStatusBarStateController 42 import kotlinx.coroutines.ExperimentalCoroutinesApi 43 44 @OptIn(ExperimentalCoroutinesApi::class) 45 val Kosmos.qsFragmentComposeViewModelFactory by <lambda>null46 Kosmos.Fixture { 47 object : QSFragmentComposeViewModel.Factory { 48 override fun create( 49 lifecycleScope: LifecycleCoroutineScope 50 ): QSFragmentComposeViewModel { 51 return QSFragmentComposeViewModel( 52 quickSettingsContainerViewModelFactory, 53 mainResources, 54 footerActionsViewModelFactory, 55 footerActionsController, 56 sysuiStatusBarStateController, 57 deviceEntryInteractor, 58 disableFlagsInteractor, 59 keyguardTransitionInteractor, 60 largeScreenShadeInterpolator, 61 shadeInteractor, 62 configurationInteractor, 63 largeScreenHeaderHelper, 64 tileSquishinessInteractor, 65 falsingInteractor, 66 inFirstPageViewModel, 67 logcatTableLogBuffer(this@Fixture), 68 mediaInRowInLandscapeViewModelFactory, 69 qqsMediaHost, 70 qsMediaHost, 71 usingMediaInComposeFragment, 72 uiEventLoggerFake, 73 lifecycleScope, 74 ) 75 } 76 } 77 } 78