• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright (C) 2018 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.systemui.appops.AppOpsController;
20 import com.android.systemui.appops.AppOpsControllerImpl;
21 import com.android.systemui.classifier.FalsingManagerProxy;
22 import com.android.systemui.plugins.ActivityStarter;
23 import com.android.systemui.plugins.DarkIconDispatcher;
24 import com.android.systemui.plugins.FalsingManager;
25 import com.android.systemui.plugins.VolumeDialogController;
26 import com.android.systemui.plugins.statusbar.StatusBarStateController;
27 import com.android.systemui.power.PowerNotificationWarnings;
28 import com.android.systemui.power.PowerUI;
29 import com.android.systemui.qs.QSHost;
30 import com.android.systemui.qs.QSTileHost;
31 import com.android.systemui.statusbar.NotificationRemoteInputManager;
32 import com.android.systemui.statusbar.StatusBarStateControllerImpl;
33 import com.android.systemui.statusbar.phone.DarkIconDispatcherImpl;
34 import com.android.systemui.statusbar.phone.ManagedProfileController;
35 import com.android.systemui.statusbar.phone.ManagedProfileControllerImpl;
36 import com.android.systemui.statusbar.phone.StatusBarIconController;
37 import com.android.systemui.statusbar.phone.StatusBarIconControllerImpl;
38 import com.android.systemui.statusbar.phone.StatusBarRemoteInputCallback;
39 import com.android.systemui.statusbar.policy.BatteryController;
40 import com.android.systemui.statusbar.policy.BatteryControllerImpl;
41 import com.android.systemui.statusbar.policy.BluetoothController;
42 import com.android.systemui.statusbar.policy.BluetoothControllerImpl;
43 import com.android.systemui.statusbar.policy.CastController;
44 import com.android.systemui.statusbar.policy.CastControllerImpl;
45 import com.android.systemui.statusbar.policy.DeviceProvisionedController;
46 import com.android.systemui.statusbar.policy.DeviceProvisionedControllerImpl;
47 import com.android.systemui.statusbar.policy.ExtensionController;
48 import com.android.systemui.statusbar.policy.ExtensionControllerImpl;
49 import com.android.systemui.statusbar.policy.FlashlightController;
50 import com.android.systemui.statusbar.policy.FlashlightControllerImpl;
51 import com.android.systemui.statusbar.policy.HotspotController;
52 import com.android.systemui.statusbar.policy.HotspotControllerImpl;
53 import com.android.systemui.statusbar.policy.KeyguardMonitor;
54 import com.android.systemui.statusbar.policy.KeyguardMonitorImpl;
55 import com.android.systemui.statusbar.policy.LocationController;
56 import com.android.systemui.statusbar.policy.LocationControllerImpl;
57 import com.android.systemui.statusbar.policy.NetworkController;
58 import com.android.systemui.statusbar.policy.NetworkControllerImpl;
59 import com.android.systemui.statusbar.policy.NextAlarmController;
60 import com.android.systemui.statusbar.policy.NextAlarmControllerImpl;
61 import com.android.systemui.statusbar.policy.RotationLockController;
62 import com.android.systemui.statusbar.policy.RotationLockControllerImpl;
63 import com.android.systemui.statusbar.policy.SecurityController;
64 import com.android.systemui.statusbar.policy.SecurityControllerImpl;
65 import com.android.systemui.statusbar.policy.SensorPrivacyController;
66 import com.android.systemui.statusbar.policy.SensorPrivacyControllerImpl;
67 import com.android.systemui.statusbar.policy.UserInfoController;
68 import com.android.systemui.statusbar.policy.UserInfoControllerImpl;
69 import com.android.systemui.statusbar.policy.ZenModeController;
70 import com.android.systemui.statusbar.policy.ZenModeControllerImpl;
71 import com.android.systemui.tuner.TunerService;
72 import com.android.systemui.tuner.TunerServiceImpl;
73 import com.android.systemui.volume.VolumeDialogControllerImpl;
74 
75 import dagger.Binds;
76 import dagger.Module;
77 
78 /**
79  * Maps interfaces to implementations for use with Dagger.
80  */
81 @Module
82 public abstract class DependencyBinder {
83 
84     /**
85      */
86     @Binds
provideActivityStarter(ActivityStarterDelegate delegate)87     public abstract ActivityStarter provideActivityStarter(ActivityStarterDelegate delegate);
88 
89     /**
90      */
91     @Binds
provideBluetoothController( BluetoothControllerImpl controllerImpl)92     public abstract BluetoothController provideBluetoothController(
93             BluetoothControllerImpl controllerImpl);
94 
95     /**
96      */
97     @Binds
provideLocationController( LocationControllerImpl controllerImpl)98     public abstract LocationController provideLocationController(
99             LocationControllerImpl controllerImpl);
100 
101     /**
102      */
103     @Binds
provideRotationLockController( RotationLockControllerImpl controllerImpl)104     public abstract RotationLockController provideRotationLockController(
105             RotationLockControllerImpl controllerImpl);
106 
107     /**
108      */
109     @Binds
provideNetworkController( NetworkControllerImpl controllerImpl)110     public abstract NetworkController provideNetworkController(
111             NetworkControllerImpl controllerImpl);
112 
113     /**
114      */
115     @Binds
provideZenModeController( ZenModeControllerImpl controllerImpl)116     public abstract ZenModeController provideZenModeController(
117             ZenModeControllerImpl controllerImpl);
118 
119     /**
120      */
121     @Binds
provideHotspotController( HotspotControllerImpl controllerImpl)122     public abstract HotspotController provideHotspotController(
123             HotspotControllerImpl controllerImpl);
124 
125     /**
126      */
127     @Binds
provideAppOpsController( AppOpsControllerImpl controllerImpl)128     public abstract AppOpsController provideAppOpsController(
129             AppOpsControllerImpl controllerImpl);
130 
131     /**
132      */
133     @Binds
provideNotificationRemoteInputManager( StatusBarRemoteInputCallback callbackImpl)134     public abstract NotificationRemoteInputManager.Callback provideNotificationRemoteInputManager(
135             StatusBarRemoteInputCallback callbackImpl);
136 
137     /**
138      */
139     @Binds
provideCastController(CastControllerImpl controllerImpl)140     public abstract CastController provideCastController(CastControllerImpl controllerImpl);
141 
142     /**
143      */
144     @Binds
provideFlashlightController( FlashlightControllerImpl controllerImpl)145     public abstract FlashlightController provideFlashlightController(
146             FlashlightControllerImpl controllerImpl);
147 
148     /**
149      */
150     @Binds
provideKeyguardMonitor(KeyguardMonitorImpl controllerImpl)151     public abstract KeyguardMonitor provideKeyguardMonitor(KeyguardMonitorImpl controllerImpl);
152 
153     /**
154      */
155     @Binds
provideUserInfoContrller( UserInfoControllerImpl controllerImpl)156     public abstract UserInfoController provideUserInfoContrller(
157             UserInfoControllerImpl controllerImpl);
158 
159     /**
160      */
161     @Binds
provideBatteryController( BatteryControllerImpl controllerImpl)162     public abstract BatteryController provideBatteryController(
163             BatteryControllerImpl controllerImpl);
164 
165     /**
166      */
167     @Binds
provideManagedProfileController( ManagedProfileControllerImpl controllerImpl)168     public abstract ManagedProfileController provideManagedProfileController(
169             ManagedProfileControllerImpl controllerImpl);
170 
171     /**
172      */
173     @Binds
provideNextAlarmController( NextAlarmControllerImpl controllerImpl)174     public abstract NextAlarmController provideNextAlarmController(
175             NextAlarmControllerImpl controllerImpl);
176 
177     /**
178      */
179     @Binds
provideDeviceProvisionedController( DeviceProvisionedControllerImpl controllerImpl)180     public abstract DeviceProvisionedController provideDeviceProvisionedController(
181             DeviceProvisionedControllerImpl controllerImpl);
182 
183     /**
184      */
185     @Binds
provideSecurityController( SecurityControllerImpl controllerImpl)186     public abstract SecurityController provideSecurityController(
187             SecurityControllerImpl controllerImpl);
188 
189     /**
190      */
191     @Binds
provideTunerService(TunerServiceImpl controllerImpl)192     public abstract TunerService provideTunerService(TunerServiceImpl controllerImpl);
193 
194     /**
195      */
196     @Binds
provideDarkIconDispatcher( DarkIconDispatcherImpl controllerImpl)197     public abstract DarkIconDispatcher provideDarkIconDispatcher(
198             DarkIconDispatcherImpl controllerImpl);
199 
200     /**
201      */
202     @Binds
provideStatusBarStateController( StatusBarStateControllerImpl controllerImpl)203     public abstract StatusBarStateController provideStatusBarStateController(
204             StatusBarStateControllerImpl controllerImpl);
205 
206     /**
207      */
208     @Binds
provideStatusBarIconController( StatusBarIconControllerImpl controllerImpl)209     public abstract StatusBarIconController provideStatusBarIconController(
210             StatusBarIconControllerImpl controllerImpl);
211 
212     /**
213      */
214     @Binds
provideExtensionController( ExtensionControllerImpl controllerImpl)215     public abstract ExtensionController provideExtensionController(
216             ExtensionControllerImpl controllerImpl);
217 
218     /**
219      */
220     @Binds
provideVolumeDialogController( VolumeDialogControllerImpl controllerImpl)221     public abstract VolumeDialogController provideVolumeDialogController(
222             VolumeDialogControllerImpl controllerImpl);
223 
224     /**
225      */
226     @Binds
provideWarningsUi(PowerNotificationWarnings controllerImpl)227     public abstract PowerUI.WarningsUI provideWarningsUi(PowerNotificationWarnings controllerImpl);
228 
229     /**
230      */
231     @Binds
provideSensorPrivacyControllerImpl( SensorPrivacyControllerImpl controllerImpl)232     public abstract SensorPrivacyController provideSensorPrivacyControllerImpl(
233             SensorPrivacyControllerImpl controllerImpl);
234 
235     /**
236      */
237     @Binds
provideQsHost(QSTileHost controllerImpl)238     public abstract QSHost provideQsHost(QSTileHost controllerImpl);
239 
240     /**
241      */
242     @Binds
provideFalsingmanager(FalsingManagerProxy falsingManagerImpl)243     public abstract FalsingManager provideFalsingmanager(FalsingManagerProxy falsingManagerImpl);
244 }
245