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.car.window;
18 
19 import com.android.systemui.car.hvac.HvacPanelOverlayViewMediator;
20 import com.android.systemui.car.keyguard.CarKeyguardOverlayViewMediator;
21 import com.android.systemui.car.notification.BottomNotificationPanelViewMediator;
22 import com.android.systemui.car.notification.NotificationPanelViewMediator;
23 import com.android.systemui.car.notification.TopNotificationPanelViewMediator;
24 import com.android.systemui.car.systemdialogs.SystemDialogsViewMediator;
25 import com.android.systemui.car.userswitcher.FullscreenUserSwitcherViewMediator;
26 import com.android.systemui.car.userswitcher.UserSwitchTransitionViewMediator;
27 
28 import dagger.Binds;
29 import dagger.Module;
30 import dagger.multibindings.ClassKey;
31 import dagger.multibindings.IntoMap;
32 
33 /**
34  * Dagger injection module for {@link SystemUIOverlayWindowManager}
35  */
36 @Module
37 public abstract class OverlayWindowModule {
38 
39     /** Injects NotificationPanelViewMediator. */
40     @Binds
41     @IntoMap
42     @ClassKey(NotificationPanelViewMediator.class)
bindNotificationPanelViewMediator( NotificationPanelViewMediator notificationPanelViewMediator)43     public abstract OverlayViewMediator bindNotificationPanelViewMediator(
44             NotificationPanelViewMediator notificationPanelViewMediator);
45 
46     /** Injects TopNotificationPanelViewMediator. */
47     @Binds
48     @IntoMap
49     @ClassKey(TopNotificationPanelViewMediator.class)
bindTopNotificationPanelViewMediator( TopNotificationPanelViewMediator topNotificationPanelViewMediator)50     public abstract OverlayViewMediator bindTopNotificationPanelViewMediator(
51             TopNotificationPanelViewMediator topNotificationPanelViewMediator);
52 
53     /** Injects BottomNotificationPanelViewMediator. */
54     @Binds
55     @IntoMap
56     @ClassKey(BottomNotificationPanelViewMediator.class)
bindBottomNotificationPanelViewMediator( BottomNotificationPanelViewMediator bottomNotificationPanelViewMediator)57     public abstract OverlayViewMediator bindBottomNotificationPanelViewMediator(
58             BottomNotificationPanelViewMediator bottomNotificationPanelViewMediator);
59 
60     /** Inject into CarKeyguardOverlayViewMediator. */
61     @Binds
62     @IntoMap
63     @ClassKey(CarKeyguardOverlayViewMediator.class)
bindCarKeyguardOverlayViewMediator( CarKeyguardOverlayViewMediator carKeyguardOverlayViewMediator)64     public abstract OverlayViewMediator bindCarKeyguardOverlayViewMediator(
65             CarKeyguardOverlayViewMediator carKeyguardOverlayViewMediator);
66 
67     /** Injects FullscreenUserSwitcherViewsMediator. */
68     @Binds
69     @IntoMap
70     @ClassKey(FullscreenUserSwitcherViewMediator.class)
bindFullscreenUserSwitcherViewsMediator( FullscreenUserSwitcherViewMediator overlayViewsMediator)71     public abstract OverlayViewMediator bindFullscreenUserSwitcherViewsMediator(
72             FullscreenUserSwitcherViewMediator overlayViewsMediator);
73 
74     /** Injects CarUserSwitchingDialogMediator. */
75     @Binds
76     @IntoMap
77     @ClassKey(UserSwitchTransitionViewMediator.class)
bindUserSwitchTransitionViewMediator( UserSwitchTransitionViewMediator userSwitchTransitionViewMediator)78     public abstract OverlayViewMediator bindUserSwitchTransitionViewMediator(
79             UserSwitchTransitionViewMediator userSwitchTransitionViewMediator);
80 
81     /** Injects HvacPanelOverlayViewMediator. */
82     @Binds
83     @IntoMap
84     @ClassKey(HvacPanelOverlayViewMediator.class)
bindHvacPanelOverlayViewMediator( HvacPanelOverlayViewMediator overlayViewMediator)85     public abstract OverlayViewMediator bindHvacPanelOverlayViewMediator(
86             HvacPanelOverlayViewMediator overlayViewMediator);
87 
88     /** Inject SystemDialogsViewMediator. */
89     @Binds
90     @IntoMap
91     @ClassKey(SystemDialogsViewMediator.class)
bindSystemDialogsViewMediator( SystemDialogsViewMediator sysui)92     public abstract OverlayViewMediator bindSystemDialogsViewMediator(
93             SystemDialogsViewMediator sysui);
94 }
95