• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright (C) 2021 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
18 
19 import com.android.keyguard.KeyguardBiometricLockoutLogger
20 import com.android.systemui.car.input.DisplayInputSinkController
21 import com.android.systemui.car.toast.CarToastUI
22 import com.android.systemui.car.voicerecognition.ConnectedDeviceVoiceRecognitionNotifier
23 import com.android.systemui.car.window.SystemUIOverlayWindowManager
24 import com.android.systemui.car.wm.activity.window.ActivityWindowManager
25 import com.android.systemui.car.wm.cluster.ClusterDisplayController
26 import com.android.systemui.dagger.qualifiers.PerUser
27 import com.android.systemui.keyguard.KeyguardViewMediator
28 import com.android.systemui.log.SessionTracker
29 import com.android.systemui.media.RingtonePlayer
30 import com.android.systemui.theme.ThemeOverlayController
31 import com.android.systemui.usb.StorageNotification
32 import com.android.systemui.util.NotificationChannels
33 import com.android.systemui.wmshell.WMShell
34 import dagger.Binds
35 import dagger.Module
36 import dagger.multibindings.ClassKey
37 import dagger.multibindings.IntoMap
38 import dagger.multibindings.Multibinds
39 
40 /**
41  * DEPRECATED: DO NOT ADD THINGS TO THIS FILE.
42  *
43  * Add a feature specific dagger module for what you are working on. Bind your CoreStartable there.
44  * Include that module where it is needed.
45  *
46  * @deprecated
47  */
48 @Module
49 abstract class CarSystemUICoreStartableModule {
50     /** Empty set for @PerUser. */
51     @Multibinds
52     @PerUser
bindEmptyPerUserMapnull53     abstract fun bindEmptyPerUserMap(): Map<Class<*>, CoreStartable>
54 
55     /** Inject into CarToastUI.  */
56     @Binds
57     @IntoMap
58     @ClassKey(CarToastUI::class)
59     abstract fun bindCarToastUI(service: CarToastUI): CoreStartable
60 
61     /** Inject into ClusterDisplayController.  */
62     @Binds
63     @IntoMap
64     @ClassKey(ClusterDisplayController::class)
65     abstract fun bindClusterDisplayController(service: ClusterDisplayController): CoreStartable
66 
67     /** Inject into DisplayInputSinkController. */
68     @Binds
69     @IntoMap
70     @ClassKey(DisplayInputSinkController::class)
71     abstract fun bindDisplayInputSinkController(service: DisplayInputSinkController): CoreStartable
72 
73     /** Inject into ConnectedDeviceVoiceRecognitionNotifier.  */
74     @Binds
75     @IntoMap
76     @ClassKey(ConnectedDeviceVoiceRecognitionNotifier::class)
77     abstract fun bindConnectedDeviceVoiceRecognitionNotifier(
78             service: ConnectedDeviceVoiceRecognitionNotifier
79     ): CoreStartable
80 
81     /** Inject into KeyguardBiometricLockoutLogger.  */
82     @Binds
83     @IntoMap
84     @ClassKey(KeyguardBiometricLockoutLogger::class)
85     abstract fun bindKeyguardBiometricLockoutLogger(
86             sysui: KeyguardBiometricLockoutLogger
87     ): CoreStartable
88 
89     /** Inject into KeyguardViewMediator.  */
90     @Binds
91     @IntoMap
92     @ClassKey(KeyguardViewMediator::class)
93     abstract fun bindKeyguardViewMediator(sysui: KeyguardViewMediator): CoreStartable
94 
95     /** Inject into NotificationChannels.  */
96     @Binds
97     @IntoMap
98     @ClassKey(NotificationChannels::class)
99     @PerUser
100     abstract fun bindNotificationChannels(sysui: NotificationChannels): CoreStartable
101 
102     /** Inject into RingtonePlayer.  */
103     @Binds
104     @IntoMap
105     @ClassKey(RingtonePlayer::class)
106     abstract fun bind(sysui: RingtonePlayer): CoreStartable
107 
108     /** Inject into SessionTracker.  */
109     @Binds
110     @IntoMap
111     @ClassKey(SessionTracker::class)
112     abstract fun bindSessionTracker(service: SessionTracker): CoreStartable
113 
114     /** Inject into StorageNotification.  */
115     @Binds
116     @IntoMap
117     @ClassKey(StorageNotification::class)
118     abstract fun bindStorageNotification(sysui: StorageNotification): CoreStartable
119 
120     /** Inject into SystemUIOverlayWindowManager.  */
121     @Binds
122     @IntoMap
123     @ClassKey(SystemUIOverlayWindowManager::class)
124     abstract fun bindSystemUIOverlayWindowManager(
125             sysui: SystemUIOverlayWindowManager
126     ): CoreStartable
127 
128     /** Inject into ThemeOverlayController.  */
129     @Binds
130     @IntoMap
131     @ClassKey(ThemeOverlayController::class)
132     abstract fun bindThemeOverlayController(sysui: ThemeOverlayController): CoreStartable
133 
134     /** Inject into WMShell.  */
135     @Binds
136     @IntoMap
137     @ClassKey(WMShell::class)
138     abstract fun bindWMShell(sysui: WMShell): CoreStartable
139 
140     /** Inject into ActivityWindowManager. */
141     @Binds
142     @IntoMap
143     @ClassKey(ActivityWindowManager::class)
144     abstract fun bindActivityWindowManager(
145         activityWindowManager: ActivityWindowManager
146     ): CoreStartable
147 }
148