1 /* 2 * Copyright (C) 2020 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.classifier.FalsingManagerProxy; 20 import com.android.systemui.globalactions.GlobalActionsComponent; 21 import com.android.systemui.globalactions.GlobalActionsImpl; 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.GlobalActions; 26 import com.android.systemui.plugins.VolumeDialogController; 27 import com.android.systemui.plugins.statusbar.StatusBarStateController; 28 import com.android.systemui.statusbar.StatusBarStateControllerImpl; 29 import com.android.systemui.statusbar.phone.ActivityStarterImpl; 30 import com.android.systemui.statusbar.phone.DarkIconDispatcherImpl; 31 import com.android.systemui.statusbar.phone.SysuiDarkIconDispatcher; 32 import com.android.systemui.volume.VolumeDialogControllerImpl; 33 34 import dagger.Binds; 35 import dagger.Module; 36 37 /** 38 * Module for binding Plugin implementations. 39 * 40 * TODO(b/166258224): Many of these should be moved closer to their implementations. 41 */ 42 @Module 43 public abstract class PluginModule { 44 45 /** */ 46 @Binds provideActivityStarter(ActivityStarterImpl activityStarterImpl)47 abstract ActivityStarter provideActivityStarter(ActivityStarterImpl activityStarterImpl); 48 49 /** */ 50 @Binds provideDarkIconDispatcher(DarkIconDispatcherImpl controllerImpl)51 abstract DarkIconDispatcher provideDarkIconDispatcher(DarkIconDispatcherImpl controllerImpl); 52 53 @Binds provideSysuiDarkIconDispatcher( DarkIconDispatcherImpl controllerImpl)54 abstract SysuiDarkIconDispatcher provideSysuiDarkIconDispatcher( 55 DarkIconDispatcherImpl controllerImpl); 56 57 /** */ 58 @Binds provideFalsingManager(FalsingManagerProxy falsingManagerImpl)59 abstract FalsingManager provideFalsingManager(FalsingManagerProxy falsingManagerImpl); 60 61 /** */ 62 @Binds provideGlobalActions(GlobalActionsImpl controllerImpl)63 abstract GlobalActions provideGlobalActions(GlobalActionsImpl controllerImpl); 64 65 /** */ 66 @Binds provideGlobalActionsManager( GlobalActionsComponent controllerImpl)67 abstract GlobalActions.GlobalActionsManager provideGlobalActionsManager( 68 GlobalActionsComponent controllerImpl); 69 70 /** */ 71 @Binds provideStatusBarStateController( StatusBarStateControllerImpl controllerImpl)72 abstract StatusBarStateController provideStatusBarStateController( 73 StatusBarStateControllerImpl controllerImpl); 74 75 /** */ 76 @Binds provideVolumeDialogController( VolumeDialogControllerImpl controllerImpl)77 abstract VolumeDialogController provideVolumeDialogController( 78 VolumeDialogControllerImpl controllerImpl); 79 } 80