• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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.screenshot.ActionProxyReceiver;
23 import com.android.systemui.screenshot.DeleteScreenshotReceiver;
24 import com.android.systemui.screenshot.SmartActionsReceiver;
25 
26 import dagger.Binds;
27 import dagger.Module;
28 import dagger.multibindings.ClassKey;
29 import dagger.multibindings.IntoMap;
30 
31 /**
32  * BroadcastReceivers that are injectable should go here.
33  */
34 @Module
35 public abstract class DefaultBroadcastReceiverBinder {
36     /**
37      *
38      */
39     @Binds
40     @IntoMap
41     @ClassKey(ActionProxyReceiver.class)
bindActionProxyReceiver( ActionProxyReceiver broadcastReceiver)42     public abstract BroadcastReceiver bindActionProxyReceiver(
43             ActionProxyReceiver broadcastReceiver);
44 
45     /**
46      *
47      */
48     @Binds
49     @IntoMap
50     @ClassKey(DeleteScreenshotReceiver.class)
bindDeleteScreenshotReceiver( DeleteScreenshotReceiver broadcastReceiver)51     public abstract BroadcastReceiver bindDeleteScreenshotReceiver(
52             DeleteScreenshotReceiver broadcastReceiver);
53 
54     /**
55      *
56      */
57     @Binds
58     @IntoMap
59     @ClassKey(SmartActionsReceiver.class)
bindSmartActionsReceiver( SmartActionsReceiver broadcastReceiver)60     public abstract BroadcastReceiver bindSmartActionsReceiver(
61             SmartActionsReceiver broadcastReceiver);
62 
63     /**
64      *
65      */
66     @Binds
67     @IntoMap
68     @ClassKey(MediaOutputDialogReceiver.class)
bindMediaOutputDialogReceiver( MediaOutputDialogReceiver broadcastReceiver)69     public abstract BroadcastReceiver bindMediaOutputDialogReceiver(
70             MediaOutputDialogReceiver broadcastReceiver);
71 
72 }
73