• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright (C) 2023 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.shade
18 
19 import com.android.systemui.dagger.SysUISingleton
20 import com.android.systemui.shade.data.repository.PrivacyChipRepository
21 import com.android.systemui.shade.data.repository.PrivacyChipRepositoryImpl
22 import com.android.systemui.shade.data.repository.ShadeRepository
23 import com.android.systemui.shade.data.repository.ShadeRepositoryImpl
24 import com.android.systemui.shade.domain.interactor.PanelExpansionInteractor
25 import com.android.systemui.shade.domain.interactor.ShadeAnimationInteractor
26 import com.android.systemui.shade.domain.interactor.ShadeAnimationInteractorEmptyImpl
27 import com.android.systemui.shade.domain.interactor.ShadeBackActionInteractor
28 import com.android.systemui.shade.domain.interactor.ShadeInteractor
29 import com.android.systemui.shade.domain.interactor.ShadeInteractorEmptyImpl
30 import com.android.systemui.shade.domain.interactor.ShadeLockscreenInteractor
31 import dagger.Binds
32 import dagger.Module
33 
34 /** Fulfills dependencies on the shade with empty implementations for variants with no shade. */
35 @Module
36 abstract class ShadeEmptyImplModule {
37     @Binds
38     @SysUISingleton
bindsShadeViewControllernull39     abstract fun bindsShadeViewController(svc: ShadeViewControllerEmptyImpl): ShadeViewController
40 
41     @Binds
42     @SysUISingleton
43     abstract fun bindsShadeBack(sbai: ShadeViewControllerEmptyImpl): ShadeBackActionInteractor
44 
45     @Binds
46     @SysUISingleton
47     abstract fun bindsShadeLockscreenInteractor(
48         slsi: ShadeViewControllerEmptyImpl
49     ): ShadeLockscreenInteractor
50 
51     @Binds
52     @SysUISingleton
53     abstract fun bindsShadeController(sc: ShadeControllerEmptyImpl): ShadeController
54 
55     @Binds
56     @SysUISingleton
57     abstract fun bindsShadeInteractor(si: ShadeInteractorEmptyImpl): ShadeInteractor
58 
59     @Binds
60     @SysUISingleton
61     abstract fun bindsShadeRepository(impl: ShadeRepositoryImpl): ShadeRepository
62 
63     @Binds
64     @SysUISingleton
65     abstract fun bindsShadeAnimationInteractor(
66         sai: ShadeAnimationInteractorEmptyImpl
67     ): ShadeAnimationInteractor
68 
69     @Binds
70     @SysUISingleton
71     abstract fun bindsPanelExpansionInteractor(
72         sbai: ShadeViewControllerEmptyImpl
73     ): PanelExpansionInteractor
74 
75     @Binds
76     @SysUISingleton
77     abstract fun bindsPrivacyChipRepository(impl: PrivacyChipRepositoryImpl): PrivacyChipRepository
78 }
79