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 android.content.BroadcastReceiver;
20 
21 import com.android.systemui.media.dialog.MediaOutputDialogReceiver;
22 import com.android.systemui.people.widget.PeopleSpaceWidgetPinnedReceiver;
23 import com.android.systemui.people.widget.PeopleSpaceWidgetProvider;
24 import com.android.systemui.screenshot.ActionProxyReceiver;
25 import com.android.systemui.screenshot.DeleteScreenshotReceiver;
26 import com.android.systemui.screenshot.SmartActionsReceiver;
27 
28 import dagger.Binds;
29 import dagger.Module;
30 import dagger.multibindings.ClassKey;
31 import dagger.multibindings.IntoMap;
32 
33 /**
34  * BroadcastReceivers that are injectable should go here.
35  */
36 @Module
37 public abstract class DefaultBroadcastReceiverBinder {
38     /**
39      *
40      */
41     @Binds
42     @IntoMap
43     @ClassKey(ActionProxyReceiver.class)
bindActionProxyReceiver( ActionProxyReceiver broadcastReceiver)44     public abstract BroadcastReceiver bindActionProxyReceiver(
45             ActionProxyReceiver broadcastReceiver);
46 
47     /**
48      *
49      */
50     @Binds
51     @IntoMap
52     @ClassKey(DeleteScreenshotReceiver.class)
bindDeleteScreenshotReceiver( DeleteScreenshotReceiver broadcastReceiver)53     public abstract BroadcastReceiver bindDeleteScreenshotReceiver(
54             DeleteScreenshotReceiver broadcastReceiver);
55 
56     /**
57      *
58      */
59     @Binds
60     @IntoMap
61     @ClassKey(SmartActionsReceiver.class)
bindSmartActionsReceiver( SmartActionsReceiver broadcastReceiver)62     public abstract BroadcastReceiver bindSmartActionsReceiver(
63             SmartActionsReceiver broadcastReceiver);
64 
65     /**
66      *
67      */
68     @Binds
69     @IntoMap
70     @ClassKey(MediaOutputDialogReceiver.class)
bindMediaOutputDialogReceiver( MediaOutputDialogReceiver broadcastReceiver)71     public abstract BroadcastReceiver bindMediaOutputDialogReceiver(
72             MediaOutputDialogReceiver broadcastReceiver);
73 
74     /**
75      *
76      */
77     @Binds
78     @IntoMap
79     @ClassKey(PeopleSpaceWidgetPinnedReceiver.class)
bindPeopleSpaceWidgetPinnedReceiver( PeopleSpaceWidgetPinnedReceiver broadcastReceiver)80     public abstract BroadcastReceiver bindPeopleSpaceWidgetPinnedReceiver(
81             PeopleSpaceWidgetPinnedReceiver broadcastReceiver);
82 
83     /**
84      *
85      */
86     @Binds
87     @IntoMap
88     @ClassKey(PeopleSpaceWidgetProvider.class)
bindPeopleSpaceWidgetProvider( PeopleSpaceWidgetProvider broadcastReceiver)89     public abstract BroadcastReceiver bindPeopleSpaceWidgetProvider(
90             PeopleSpaceWidgetProvider broadcastReceiver);
91 
92 }
93