Jason Monk | 196d639 | 2018-12-20 13:25:34 -0500 | [diff] [blame] | 1 | /* |
Dave Mankoff | f473681 | 2019-10-18 17:25:50 -0400 | [diff] [blame] | 2 | * Copyright (C) 2019 The Android Open Source Project |
Jason Monk | 196d639 | 2018-12-20 13:25:34 -0500 | [diff] [blame] | 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 | |
Dave Mankoff | f473681 | 2019-10-18 17:25:50 -0400 | [diff] [blame] | 17 | package com.android.systemui.dagger; |
Jason Monk | 196d639 | 2018-12-20 13:25:34 -0500 | [diff] [blame] | 18 | |
Dave Mankoff | f473681 | 2019-10-18 17:25:50 -0400 | [diff] [blame] | 19 | import com.android.systemui.ActivityStarterDelegate; |
Jason Monk | 196d639 | 2018-12-20 13:25:34 -0500 | [diff] [blame] | 20 | import com.android.systemui.appops.AppOpsController; |
| 21 | import com.android.systemui.appops.AppOpsControllerImpl; |
Dave Mankoff | 468d4f6 | 2019-05-08 14:56:29 -0400 | [diff] [blame] | 22 | import com.android.systemui.classifier.FalsingManagerProxy; |
Fabian Kozynski | f10b6ab | 2019-12-27 09:31:04 -0500 | [diff] [blame] | 23 | import com.android.systemui.controls.dagger.ControlsModule; |
Dave Mankoff | c88a2d7 | 2020-01-10 15:59:31 -0500 | [diff] [blame] | 24 | import com.android.systemui.globalactions.GlobalActionsComponent; |
| 25 | import com.android.systemui.globalactions.GlobalActionsImpl; |
Jason Monk | 196d639 | 2018-12-20 13:25:34 -0500 | [diff] [blame] | 26 | import com.android.systemui.plugins.ActivityStarter; |
Beverly | 1be62f4 | 2018-12-19 17:17:48 -0500 | [diff] [blame] | 27 | import com.android.systemui.plugins.DarkIconDispatcher; |
Dave Mankoff | 468d4f6 | 2019-05-08 14:56:29 -0400 | [diff] [blame] | 28 | import com.android.systemui.plugins.FalsingManager; |
Dave Mankoff | c88a2d7 | 2020-01-10 15:59:31 -0500 | [diff] [blame] | 29 | import com.android.systemui.plugins.GlobalActions; |
Jason Monk | 196d639 | 2018-12-20 13:25:34 -0500 | [diff] [blame] | 30 | import com.android.systemui.plugins.VolumeDialogController; |
Beverly | 8011091 | 2019-02-13 12:20:57 -0500 | [diff] [blame] | 31 | import com.android.systemui.plugins.statusbar.StatusBarStateController; |
Jason Monk | 196d639 | 2018-12-20 13:25:34 -0500 | [diff] [blame] | 32 | import com.android.systemui.power.PowerNotificationWarnings; |
| 33 | import com.android.systemui.power.PowerUI; |
Jason Monk | 5d57720 | 2018-12-26 15:43:06 -0500 | [diff] [blame] | 34 | import com.android.systemui.qs.QSHost; |
| 35 | import com.android.systemui.qs.QSTileHost; |
Jason Monk | 196d639 | 2018-12-20 13:25:34 -0500 | [diff] [blame] | 36 | import com.android.systemui.statusbar.NotificationRemoteInputManager; |
Beverly | 8011091 | 2019-02-13 12:20:57 -0500 | [diff] [blame] | 37 | import com.android.systemui.statusbar.StatusBarStateControllerImpl; |
Dave Mankoff | beef8f1 | 2019-10-03 19:06:55 +0000 | [diff] [blame] | 38 | import com.android.systemui.statusbar.SysuiStatusBarStateController; |
Jason Monk | 196d639 | 2018-12-20 13:25:34 -0500 | [diff] [blame] | 39 | import com.android.systemui.statusbar.phone.DarkIconDispatcherImpl; |
| 40 | import com.android.systemui.statusbar.phone.ManagedProfileController; |
| 41 | import com.android.systemui.statusbar.phone.ManagedProfileControllerImpl; |
| 42 | import com.android.systemui.statusbar.phone.StatusBarIconController; |
| 43 | import com.android.systemui.statusbar.phone.StatusBarIconControllerImpl; |
| 44 | import com.android.systemui.statusbar.phone.StatusBarRemoteInputCallback; |
Jason Monk | 196d639 | 2018-12-20 13:25:34 -0500 | [diff] [blame] | 45 | import com.android.systemui.statusbar.policy.BluetoothController; |
| 46 | import com.android.systemui.statusbar.policy.BluetoothControllerImpl; |
| 47 | import com.android.systemui.statusbar.policy.CastController; |
| 48 | import com.android.systemui.statusbar.policy.CastControllerImpl; |
Jason Monk | 196d639 | 2018-12-20 13:25:34 -0500 | [diff] [blame] | 49 | import com.android.systemui.statusbar.policy.ExtensionController; |
| 50 | import com.android.systemui.statusbar.policy.ExtensionControllerImpl; |
| 51 | import com.android.systemui.statusbar.policy.FlashlightController; |
| 52 | import com.android.systemui.statusbar.policy.FlashlightControllerImpl; |
| 53 | import com.android.systemui.statusbar.policy.HotspotController; |
| 54 | import com.android.systemui.statusbar.policy.HotspotControllerImpl; |
Lucas Dupin | c8f16e8 | 2019-09-17 18:24:50 -0400 | [diff] [blame] | 55 | import com.android.systemui.statusbar.policy.KeyguardStateController; |
| 56 | import com.android.systemui.statusbar.policy.KeyguardStateControllerImpl; |
Jason Monk | 196d639 | 2018-12-20 13:25:34 -0500 | [diff] [blame] | 57 | import com.android.systemui.statusbar.policy.LocationController; |
| 58 | import com.android.systemui.statusbar.policy.LocationControllerImpl; |
| 59 | import com.android.systemui.statusbar.policy.NetworkController; |
| 60 | import com.android.systemui.statusbar.policy.NetworkControllerImpl; |
| 61 | import com.android.systemui.statusbar.policy.NextAlarmController; |
| 62 | import com.android.systemui.statusbar.policy.NextAlarmControllerImpl; |
| 63 | import com.android.systemui.statusbar.policy.RotationLockController; |
| 64 | import com.android.systemui.statusbar.policy.RotationLockControllerImpl; |
| 65 | import com.android.systemui.statusbar.policy.SecurityController; |
| 66 | import com.android.systemui.statusbar.policy.SecurityControllerImpl; |
Michael Groover | a51ea81 | 2019-03-19 18:56:36 -0700 | [diff] [blame] | 67 | import com.android.systemui.statusbar.policy.SensorPrivacyController; |
| 68 | import com.android.systemui.statusbar.policy.SensorPrivacyControllerImpl; |
Jason Monk | 196d639 | 2018-12-20 13:25:34 -0500 | [diff] [blame] | 69 | import com.android.systemui.statusbar.policy.UserInfoController; |
| 70 | import com.android.systemui.statusbar.policy.UserInfoControllerImpl; |
| 71 | import com.android.systemui.statusbar.policy.ZenModeController; |
| 72 | import com.android.systemui.statusbar.policy.ZenModeControllerImpl; |
| 73 | import com.android.systemui.tuner.TunerService; |
| 74 | import com.android.systemui.tuner.TunerServiceImpl; |
Fabian Kozynski | b6a2037 | 2020-04-01 09:36:43 -0400 | [diff] [blame] | 75 | import com.android.systemui.util.RingerModeTracker; |
| 76 | import com.android.systemui.util.RingerModeTrackerImpl; |
Dave Mankoff | a30b88b | 2019-11-05 20:21:38 -0500 | [diff] [blame] | 77 | import com.android.systemui.volume.VolumeComponent; |
| 78 | import com.android.systemui.volume.VolumeDialogComponent; |
Jason Monk | 196d639 | 2018-12-20 13:25:34 -0500 | [diff] [blame] | 79 | import com.android.systemui.volume.VolumeDialogControllerImpl; |
| 80 | |
| 81 | import dagger.Binds; |
| 82 | import dagger.Module; |
| 83 | |
| 84 | /** |
| 85 | * Maps interfaces to implementations for use with Dagger. |
| 86 | */ |
Fabian Kozynski | f10b6ab | 2019-12-27 09:31:04 -0500 | [diff] [blame] | 87 | @Module(includes = {ControlsModule.class}) |
Jason Monk | 196d639 | 2018-12-20 13:25:34 -0500 | [diff] [blame] | 88 | public abstract class DependencyBinder { |
| 89 | |
| 90 | /** |
| 91 | */ |
| 92 | @Binds |
| 93 | public abstract ActivityStarter provideActivityStarter(ActivityStarterDelegate delegate); |
| 94 | |
| 95 | /** |
| 96 | */ |
| 97 | @Binds |
| 98 | public abstract BluetoothController provideBluetoothController( |
| 99 | BluetoothControllerImpl controllerImpl); |
| 100 | |
| 101 | /** |
| 102 | */ |
| 103 | @Binds |
Dave Mankoff | c88a2d7 | 2020-01-10 15:59:31 -0500 | [diff] [blame] | 104 | public abstract GlobalActions provideGlobalActions(GlobalActionsImpl controllerImpl); |
| 105 | |
| 106 | /** |
| 107 | */ |
| 108 | @Binds |
| 109 | public abstract GlobalActions.GlobalActionsManager provideGlobalActionsManager( |
| 110 | GlobalActionsComponent controllerImpl); |
| 111 | |
| 112 | /** |
| 113 | */ |
| 114 | @Binds |
Jason Monk | 196d639 | 2018-12-20 13:25:34 -0500 | [diff] [blame] | 115 | public abstract LocationController provideLocationController( |
| 116 | LocationControllerImpl controllerImpl); |
| 117 | |
| 118 | /** |
| 119 | */ |
| 120 | @Binds |
| 121 | public abstract RotationLockController provideRotationLockController( |
| 122 | RotationLockControllerImpl controllerImpl); |
| 123 | |
| 124 | /** |
| 125 | */ |
| 126 | @Binds |
| 127 | public abstract NetworkController provideNetworkController( |
| 128 | NetworkControllerImpl controllerImpl); |
| 129 | |
| 130 | /** |
| 131 | */ |
| 132 | @Binds |
| 133 | public abstract ZenModeController provideZenModeController( |
| 134 | ZenModeControllerImpl controllerImpl); |
| 135 | |
| 136 | /** |
| 137 | */ |
| 138 | @Binds |
| 139 | public abstract HotspotController provideHotspotController( |
| 140 | HotspotControllerImpl controllerImpl); |
| 141 | |
| 142 | /** |
| 143 | */ |
| 144 | @Binds |
| 145 | public abstract AppOpsController provideAppOpsController( |
| 146 | AppOpsControllerImpl controllerImpl); |
| 147 | |
| 148 | /** |
| 149 | */ |
| 150 | @Binds |
| 151 | public abstract NotificationRemoteInputManager.Callback provideNotificationRemoteInputManager( |
| 152 | StatusBarRemoteInputCallback callbackImpl); |
| 153 | |
| 154 | /** |
| 155 | */ |
| 156 | @Binds |
Jason Monk | 196d639 | 2018-12-20 13:25:34 -0500 | [diff] [blame] | 157 | public abstract CastController provideCastController(CastControllerImpl controllerImpl); |
| 158 | |
| 159 | /** |
| 160 | */ |
| 161 | @Binds |
| 162 | public abstract FlashlightController provideFlashlightController( |
| 163 | FlashlightControllerImpl controllerImpl); |
| 164 | |
| 165 | /** |
| 166 | */ |
| 167 | @Binds |
Lucas Dupin | c8f16e8 | 2019-09-17 18:24:50 -0400 | [diff] [blame] | 168 | public abstract KeyguardStateController provideKeyguardMonitor( |
| 169 | KeyguardStateControllerImpl controllerImpl); |
Jason Monk | 196d639 | 2018-12-20 13:25:34 -0500 | [diff] [blame] | 170 | |
| 171 | /** |
| 172 | */ |
| 173 | @Binds |
| 174 | public abstract UserInfoController provideUserInfoContrller( |
| 175 | UserInfoControllerImpl controllerImpl); |
| 176 | |
| 177 | /** |
| 178 | */ |
| 179 | @Binds |
Jason Monk | 196d639 | 2018-12-20 13:25:34 -0500 | [diff] [blame] | 180 | public abstract ManagedProfileController provideManagedProfileController( |
| 181 | ManagedProfileControllerImpl controllerImpl); |
| 182 | |
| 183 | /** |
| 184 | */ |
| 185 | @Binds |
| 186 | public abstract NextAlarmController provideNextAlarmController( |
| 187 | NextAlarmControllerImpl controllerImpl); |
| 188 | |
| 189 | /** |
| 190 | */ |
| 191 | @Binds |
Jason Monk | 196d639 | 2018-12-20 13:25:34 -0500 | [diff] [blame] | 192 | public abstract SecurityController provideSecurityController( |
| 193 | SecurityControllerImpl controllerImpl); |
| 194 | |
| 195 | /** |
| 196 | */ |
| 197 | @Binds |
| 198 | public abstract TunerService provideTunerService(TunerServiceImpl controllerImpl); |
| 199 | |
| 200 | /** |
| 201 | */ |
| 202 | @Binds |
| 203 | public abstract DarkIconDispatcher provideDarkIconDispatcher( |
| 204 | DarkIconDispatcherImpl controllerImpl); |
| 205 | |
| 206 | /** |
| 207 | */ |
| 208 | @Binds |
Beverly | 8011091 | 2019-02-13 12:20:57 -0500 | [diff] [blame] | 209 | public abstract StatusBarStateController provideStatusBarStateController( |
| 210 | StatusBarStateControllerImpl controllerImpl); |
| 211 | |
| 212 | /** |
| 213 | */ |
| 214 | @Binds |
Dave Mankoff | bb9575f | 2019-10-02 12:23:49 -0400 | [diff] [blame] | 215 | public abstract SysuiStatusBarStateController providesSysuiStatusBarStateController( |
| 216 | StatusBarStateControllerImpl statusBarStateControllerImpl); |
| 217 | |
| 218 | /** |
| 219 | */ |
| 220 | @Binds |
Jason Monk | 196d639 | 2018-12-20 13:25:34 -0500 | [diff] [blame] | 221 | public abstract StatusBarIconController provideStatusBarIconController( |
| 222 | StatusBarIconControllerImpl controllerImpl); |
| 223 | |
| 224 | /** |
| 225 | */ |
| 226 | @Binds |
| 227 | public abstract ExtensionController provideExtensionController( |
| 228 | ExtensionControllerImpl controllerImpl); |
| 229 | |
| 230 | /** |
| 231 | */ |
| 232 | @Binds |
| 233 | public abstract VolumeDialogController provideVolumeDialogController( |
| 234 | VolumeDialogControllerImpl controllerImpl); |
| 235 | |
| 236 | /** |
| 237 | */ |
| 238 | @Binds |
Jason Monk | 196d639 | 2018-12-20 13:25:34 -0500 | [diff] [blame] | 239 | public abstract PowerUI.WarningsUI provideWarningsUi(PowerNotificationWarnings controllerImpl); |
Jason Monk | 5d57720 | 2018-12-26 15:43:06 -0500 | [diff] [blame] | 240 | |
| 241 | /** |
| 242 | */ |
| 243 | @Binds |
Michael Groover | a51ea81 | 2019-03-19 18:56:36 -0700 | [diff] [blame] | 244 | public abstract SensorPrivacyController provideSensorPrivacyControllerImpl( |
| 245 | SensorPrivacyControllerImpl controllerImpl); |
| 246 | |
| 247 | /** |
| 248 | */ |
| 249 | @Binds |
Jason Monk | 5d57720 | 2018-12-26 15:43:06 -0500 | [diff] [blame] | 250 | public abstract QSHost provideQsHost(QSTileHost controllerImpl); |
Dave Mankoff | 468d4f6 | 2019-05-08 14:56:29 -0400 | [diff] [blame] | 251 | |
| 252 | /** |
| 253 | */ |
| 254 | @Binds |
Dave Mankoff | 1193aa4 | 2019-10-28 17:51:26 -0400 | [diff] [blame] | 255 | public abstract FalsingManager provideFalsingManager(FalsingManagerProxy falsingManagerImpl); |
| 256 | |
| 257 | /** |
| 258 | */ |
| 259 | @Binds |
Dave Mankoff | a30b88b | 2019-11-05 20:21:38 -0500 | [diff] [blame] | 260 | public abstract VolumeComponent provideVolumeComponent( |
| 261 | VolumeDialogComponent volumeDialogComponent); |
Fabian Kozynski | b6a2037 | 2020-04-01 09:36:43 -0400 | [diff] [blame] | 262 | |
| 263 | /** |
| 264 | */ |
| 265 | @Binds |
| 266 | public abstract RingerModeTracker provideRingerModeTracker( |
| 267 | RingerModeTrackerImpl ringerModeTrackerImpl); |
Jason Monk | 196d639 | 2018-12-20 13:25:34 -0500 | [diff] [blame] | 268 | } |