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.GuestResetOrExitSessionReceiver; 22 import com.android.systemui.accessibility.hearingaid.HearingDevicesDialogReceiver; 23 import com.android.systemui.media.dialog.MediaOutputDialogReceiver; 24 import com.android.systemui.people.widget.PeopleSpaceWidgetPinnedReceiver; 25 import com.android.systemui.people.widget.PeopleSpaceWidgetProvider; 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(SmartActionsReceiver.class) bindSmartActionsReceiver( SmartActionsReceiver broadcastReceiver)44 public abstract BroadcastReceiver bindSmartActionsReceiver( 45 SmartActionsReceiver broadcastReceiver); 46 47 /** 48 * 49 */ 50 @Binds 51 @IntoMap 52 @ClassKey(MediaOutputDialogReceiver.class) bindMediaOutputDialogReceiver( MediaOutputDialogReceiver broadcastReceiver)53 public abstract BroadcastReceiver bindMediaOutputDialogReceiver( 54 MediaOutputDialogReceiver broadcastReceiver); 55 56 /** 57 * 58 */ 59 @Binds 60 @IntoMap 61 @ClassKey(PeopleSpaceWidgetPinnedReceiver.class) bindPeopleSpaceWidgetPinnedReceiver( PeopleSpaceWidgetPinnedReceiver broadcastReceiver)62 public abstract BroadcastReceiver bindPeopleSpaceWidgetPinnedReceiver( 63 PeopleSpaceWidgetPinnedReceiver broadcastReceiver); 64 65 /** 66 * 67 */ 68 @Binds 69 @IntoMap 70 @ClassKey(PeopleSpaceWidgetProvider.class) bindPeopleSpaceWidgetProvider( PeopleSpaceWidgetProvider broadcastReceiver)71 public abstract BroadcastReceiver bindPeopleSpaceWidgetProvider( 72 PeopleSpaceWidgetProvider broadcastReceiver); 73 74 /** 75 * 76 */ 77 @Binds 78 @IntoMap 79 @ClassKey(GuestResetOrExitSessionReceiver.class) bindGuestResetOrExitSessionReceiver( GuestResetOrExitSessionReceiver broadcastReceiver)80 public abstract BroadcastReceiver bindGuestResetOrExitSessionReceiver( 81 GuestResetOrExitSessionReceiver broadcastReceiver); 82 83 /** 84 * 85 */ 86 @Binds 87 @IntoMap 88 @ClassKey(HearingDevicesDialogReceiver.class) bindHearingDevicesDialogReceiver( HearingDevicesDialogReceiver broadcastReceiver)89 public abstract BroadcastReceiver bindHearingDevicesDialogReceiver( 90 HearingDevicesDialogReceiver broadcastReceiver); 91 } 92