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 17 package com.android.systemui.dagger; 18 19 import com.android.systemui.ActivityStarterDelegate; 20 import com.android.systemui.appops.AppOpsController; 21 import com.android.systemui.appops.AppOpsControllerImpl; 22 import com.android.systemui.classifier.FalsingManagerProxy; 23 import com.android.systemui.controls.dagger.ControlsModule; 24 import com.android.systemui.globalactions.GlobalActionsComponent; 25 import com.android.systemui.globalactions.GlobalActionsImpl; 26 import com.android.systemui.plugins.ActivityStarter; 27 import com.android.systemui.plugins.DarkIconDispatcher; 28 import com.android.systemui.plugins.FalsingManager; 29 import com.android.systemui.plugins.GlobalActions; 30 import com.android.systemui.plugins.VolumeDialogController; 31 import com.android.systemui.plugins.statusbar.StatusBarStateController; 32 import com.android.systemui.power.PowerNotificationWarnings; 33 import com.android.systemui.power.PowerUI; 34 import com.android.systemui.qs.QSHost; 35 import com.android.systemui.qs.QSTileHost; 36 import com.android.systemui.statusbar.NotificationRemoteInputManager; 37 import com.android.systemui.statusbar.StatusBarStateControllerImpl; 38 import com.android.systemui.statusbar.SysuiStatusBarStateController; 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; 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; 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; 55 import com.android.systemui.statusbar.policy.KeyguardStateController; 56 import com.android.systemui.statusbar.policy.KeyguardStateControllerImpl; 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; 67 import com.android.systemui.statusbar.policy.SensorPrivacyController; 68 import com.android.systemui.statusbar.policy.SensorPrivacyControllerImpl; 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; 75 import com.android.systemui.util.RingerModeTracker; 76 import com.android.systemui.util.RingerModeTrackerImpl; 77 import com.android.systemui.volume.VolumeComponent; 78 import com.android.systemui.volume.VolumeDialogComponent; 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 */ 87 @Module(includes = {ControlsModule.class}) 88 public abstract class DependencyBinder { 89 90 /** 91 */ 92 @Binds provideActivityStarter(ActivityStarterDelegate delegate)93 public abstract ActivityStarter provideActivityStarter(ActivityStarterDelegate delegate); 94 95 /** 96 */ 97 @Binds provideBluetoothController( BluetoothControllerImpl controllerImpl)98 public abstract BluetoothController provideBluetoothController( 99 BluetoothControllerImpl controllerImpl); 100 101 /** 102 */ 103 @Binds provideGlobalActions(GlobalActionsImpl controllerImpl)104 public abstract GlobalActions provideGlobalActions(GlobalActionsImpl controllerImpl); 105 106 /** 107 */ 108 @Binds provideGlobalActionsManager( GlobalActionsComponent controllerImpl)109 public abstract GlobalActions.GlobalActionsManager provideGlobalActionsManager( 110 GlobalActionsComponent controllerImpl); 111 112 /** 113 */ 114 @Binds provideLocationController( LocationControllerImpl controllerImpl)115 public abstract LocationController provideLocationController( 116 LocationControllerImpl controllerImpl); 117 118 /** 119 */ 120 @Binds provideRotationLockController( RotationLockControllerImpl controllerImpl)121 public abstract RotationLockController provideRotationLockController( 122 RotationLockControllerImpl controllerImpl); 123 124 /** 125 */ 126 @Binds provideNetworkController( NetworkControllerImpl controllerImpl)127 public abstract NetworkController provideNetworkController( 128 NetworkControllerImpl controllerImpl); 129 130 /** 131 */ 132 @Binds provideZenModeController( ZenModeControllerImpl controllerImpl)133 public abstract ZenModeController provideZenModeController( 134 ZenModeControllerImpl controllerImpl); 135 136 /** 137 */ 138 @Binds provideHotspotController( HotspotControllerImpl controllerImpl)139 public abstract HotspotController provideHotspotController( 140 HotspotControllerImpl controllerImpl); 141 142 /** 143 */ 144 @Binds provideAppOpsController( AppOpsControllerImpl controllerImpl)145 public abstract AppOpsController provideAppOpsController( 146 AppOpsControllerImpl controllerImpl); 147 148 /** 149 */ 150 @Binds provideNotificationRemoteInputManager( StatusBarRemoteInputCallback callbackImpl)151 public abstract NotificationRemoteInputManager.Callback provideNotificationRemoteInputManager( 152 StatusBarRemoteInputCallback callbackImpl); 153 154 /** 155 */ 156 @Binds provideCastController(CastControllerImpl controllerImpl)157 public abstract CastController provideCastController(CastControllerImpl controllerImpl); 158 159 /** 160 */ 161 @Binds provideFlashlightController( FlashlightControllerImpl controllerImpl)162 public abstract FlashlightController provideFlashlightController( 163 FlashlightControllerImpl controllerImpl); 164 165 /** 166 */ 167 @Binds provideKeyguardMonitor( KeyguardStateControllerImpl controllerImpl)168 public abstract KeyguardStateController provideKeyguardMonitor( 169 KeyguardStateControllerImpl controllerImpl); 170 171 /** 172 */ 173 @Binds provideUserInfoContrller( UserInfoControllerImpl controllerImpl)174 public abstract UserInfoController provideUserInfoContrller( 175 UserInfoControllerImpl controllerImpl); 176 177 /** 178 */ 179 @Binds provideManagedProfileController( ManagedProfileControllerImpl controllerImpl)180 public abstract ManagedProfileController provideManagedProfileController( 181 ManagedProfileControllerImpl controllerImpl); 182 183 /** 184 */ 185 @Binds provideNextAlarmController( NextAlarmControllerImpl controllerImpl)186 public abstract NextAlarmController provideNextAlarmController( 187 NextAlarmControllerImpl controllerImpl); 188 189 /** 190 */ 191 @Binds provideSecurityController( SecurityControllerImpl controllerImpl)192 public abstract SecurityController provideSecurityController( 193 SecurityControllerImpl controllerImpl); 194 195 /** 196 */ 197 @Binds provideTunerService(TunerServiceImpl controllerImpl)198 public abstract TunerService provideTunerService(TunerServiceImpl controllerImpl); 199 200 /** 201 */ 202 @Binds provideDarkIconDispatcher( DarkIconDispatcherImpl controllerImpl)203 public abstract DarkIconDispatcher provideDarkIconDispatcher( 204 DarkIconDispatcherImpl controllerImpl); 205 206 /** 207 */ 208 @Binds provideStatusBarStateController( StatusBarStateControllerImpl controllerImpl)209 public abstract StatusBarStateController provideStatusBarStateController( 210 StatusBarStateControllerImpl controllerImpl); 211 212 /** 213 */ 214 @Binds providesSysuiStatusBarStateController( StatusBarStateControllerImpl statusBarStateControllerImpl)215 public abstract SysuiStatusBarStateController providesSysuiStatusBarStateController( 216 StatusBarStateControllerImpl statusBarStateControllerImpl); 217 218 /** 219 */ 220 @Binds provideStatusBarIconController( StatusBarIconControllerImpl controllerImpl)221 public abstract StatusBarIconController provideStatusBarIconController( 222 StatusBarIconControllerImpl controllerImpl); 223 224 /** 225 */ 226 @Binds provideExtensionController( ExtensionControllerImpl controllerImpl)227 public abstract ExtensionController provideExtensionController( 228 ExtensionControllerImpl controllerImpl); 229 230 /** 231 */ 232 @Binds provideVolumeDialogController( VolumeDialogControllerImpl controllerImpl)233 public abstract VolumeDialogController provideVolumeDialogController( 234 VolumeDialogControllerImpl controllerImpl); 235 236 /** 237 */ 238 @Binds provideWarningsUi(PowerNotificationWarnings controllerImpl)239 public abstract PowerUI.WarningsUI provideWarningsUi(PowerNotificationWarnings controllerImpl); 240 241 /** 242 */ 243 @Binds provideSensorPrivacyControllerImpl( SensorPrivacyControllerImpl controllerImpl)244 public abstract SensorPrivacyController provideSensorPrivacyControllerImpl( 245 SensorPrivacyControllerImpl controllerImpl); 246 247 /** 248 */ 249 @Binds provideQsHost(QSTileHost controllerImpl)250 public abstract QSHost provideQsHost(QSTileHost controllerImpl); 251 252 /** 253 */ 254 @Binds provideFalsingManager(FalsingManagerProxy falsingManagerImpl)255 public abstract FalsingManager provideFalsingManager(FalsingManagerProxy falsingManagerImpl); 256 257 /** 258 */ 259 @Binds provideVolumeComponent( VolumeDialogComponent volumeDialogComponent)260 public abstract VolumeComponent provideVolumeComponent( 261 VolumeDialogComponent volumeDialogComponent); 262 263 /** 264 */ 265 @Binds provideRingerModeTracker( RingerModeTrackerImpl ringerModeTrackerImpl)266 public abstract RingerModeTracker provideRingerModeTracker( 267 RingerModeTrackerImpl ringerModeTrackerImpl); 268 } 269