1 /* 2 * Copyright (C) 2019 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 package com.android.customization.module 17 18 import android.content.Context 19 import android.content.res.Resources 20 import androidx.activity.ComponentActivity 21 import com.android.customization.picker.clock.domain.interactor.ClockPickerInteractor 22 import com.android.customization.picker.clock.ui.view.ClockViewFactory 23 import com.android.customization.picker.clock.ui.viewmodel.ClockCarouselViewModel 24 import com.android.customization.picker.clock.ui.viewmodel.ClockSettingsViewModel 25 import com.android.customization.picker.color.domain.interactor.ColorPickerInteractor 26 import com.android.customization.picker.color.ui.viewmodel.ColorPickerViewModel 27 import com.android.customization.picker.quickaffordance.domain.interactor.KeyguardQuickAffordancePickerInteractor 28 import com.android.systemui.shared.clocks.ClockRegistry 29 import com.android.wallpaper.module.Injector 30 import com.android.wallpaper.picker.customization.data.repository.WallpaperColorsRepository 31 32 interface CustomizationInjector : Injector { getCustomizationPreferencesnull33 fun getCustomizationPreferences(context: Context): CustomizationPreferences 34 35 fun getKeyguardQuickAffordancePickerInteractor( 36 context: Context, 37 ): KeyguardQuickAffordancePickerInteractor 38 39 fun getClockRegistry(context: Context): ClockRegistry? 40 41 fun getClockPickerInteractor(context: Context): ClockPickerInteractor 42 43 fun getColorPickerInteractor( 44 context: Context, 45 wallpaperColorsRepository: WallpaperColorsRepository, 46 ): ColorPickerInteractor 47 48 fun getColorPickerViewModelFactory( 49 context: Context, 50 wallpaperColorsRepository: WallpaperColorsRepository, 51 ): ColorPickerViewModel.Factory 52 53 fun getClockCarouselViewModelFactory( 54 interactor: ClockPickerInteractor, 55 clockViewFactory: ClockViewFactory, 56 resources: Resources, 57 ): ClockCarouselViewModel.Factory 58 59 fun getClockViewFactory(activity: ComponentActivity): ClockViewFactory 60 61 fun getClockSettingsViewModelFactory( 62 context: Context, 63 wallpaperColorsRepository: WallpaperColorsRepository, 64 clockViewFactory: ClockViewFactory, 65 ): ClockSettingsViewModel.Factory 66 } 67