Dave Mankoff | aa8b7ae | 2019-09-04 18:03:21 -0400 | [diff] [blame] | 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 | |
Dave Mankoff | f473681 | 2019-10-18 17:25:50 -0400 | [diff] [blame^] | 17 | package com.android.systemui.dagger; |
Dave Mankoff | aa8b7ae | 2019-09-04 18:03:21 -0400 | [diff] [blame] | 18 | |
Dave Mankoff | f473681 | 2019-10-18 17:25:50 -0400 | [diff] [blame^] | 19 | import com.android.systemui.SystemUI; |
Dave Mankoff | aa8b7ae | 2019-09-04 18:03:21 -0400 | [diff] [blame] | 20 | import com.android.systemui.keyguard.KeyguardViewMediator; |
Dave Mankoff | 33174bc | 2019-10-10 14:57:02 -0400 | [diff] [blame] | 21 | import com.android.systemui.pip.PipUI; |
Fabian Kozynski | ff5e91f | 2019-09-24 15:38:08 -0400 | [diff] [blame] | 22 | import com.android.systemui.power.PowerUI; |
Dave Mankoff | 898e1bb | 2019-09-25 17:54:19 -0400 | [diff] [blame] | 23 | import com.android.systemui.recents.Recents; |
| 24 | import com.android.systemui.recents.RecentsModule; |
Robert Snoeberger | 81d7615 | 2019-09-30 15:43:34 -0400 | [diff] [blame] | 25 | import com.android.systemui.util.leak.GarbageMonitor; |
Dave Mankoff | 33174bc | 2019-10-10 14:57:02 -0400 | [diff] [blame] | 26 | import com.android.systemui.volume.VolumeUI; |
Dave Mankoff | aa8b7ae | 2019-09-04 18:03:21 -0400 | [diff] [blame] | 27 | |
| 28 | import dagger.Binds; |
| 29 | import dagger.Module; |
| 30 | import dagger.multibindings.ClassKey; |
| 31 | import dagger.multibindings.IntoMap; |
| 32 | |
| 33 | /** |
Dave Mankoff | eb593ae | 2019-09-04 11:31:55 -0400 | [diff] [blame] | 34 | * SystemUI objects that are injectable should go here. |
Dave Mankoff | aa8b7ae | 2019-09-04 18:03:21 -0400 | [diff] [blame] | 35 | */ |
Dave Mankoff | 898e1bb | 2019-09-25 17:54:19 -0400 | [diff] [blame] | 36 | @Module(includes = {RecentsModule.class}) |
Dave Mankoff | aa8b7ae | 2019-09-04 18:03:21 -0400 | [diff] [blame] | 37 | public abstract class SystemUIBinder { |
Dave Mankoff | a5d8a39 | 2019-10-10 12:21:09 -0400 | [diff] [blame] | 38 | |
| 39 | /** Inject into GarbageMonitor.Service. */ |
| 40 | @Binds |
| 41 | @IntoMap |
| 42 | @ClassKey(GarbageMonitor.Service.class) |
| 43 | public abstract SystemUI bindGarbageMonitorService(GarbageMonitor.Service service); |
| 44 | |
Dave Mankoff | aa8b7ae | 2019-09-04 18:03:21 -0400 | [diff] [blame] | 45 | /** Inject into KeyguardViewMediator. */ |
| 46 | @Binds |
| 47 | @IntoMap |
| 48 | @ClassKey(KeyguardViewMediator.class) |
| 49 | public abstract SystemUI bindKeyguardViewMediator(KeyguardViewMediator sysui); |
Fabian Kozynski | ff5e91f | 2019-09-24 15:38:08 -0400 | [diff] [blame] | 50 | |
Dave Mankoff | 33174bc | 2019-10-10 14:57:02 -0400 | [diff] [blame] | 51 | /** Inject into PipUI. */ |
| 52 | @Binds |
| 53 | @IntoMap |
| 54 | @ClassKey(PipUI.class) |
| 55 | public abstract SystemUI bindPipUI(PipUI sysui); |
| 56 | |
Fabian Kozynski | ff5e91f | 2019-09-24 15:38:08 -0400 | [diff] [blame] | 57 | /** Inject into PowerUI. */ |
| 58 | @Binds |
| 59 | @IntoMap |
| 60 | @ClassKey(PowerUI.class) |
| 61 | public abstract SystemUI bindPowerUI(PowerUI sysui); |
Dave Mankoff | 898e1bb | 2019-09-25 17:54:19 -0400 | [diff] [blame] | 62 | |
Dave Mankoff | bb9575f | 2019-10-02 12:23:49 -0400 | [diff] [blame] | 63 | /** Inject into Recents. */ |
Dave Mankoff | 898e1bb | 2019-09-25 17:54:19 -0400 | [diff] [blame] | 64 | @Binds |
| 65 | @IntoMap |
| 66 | @ClassKey(Recents.class) |
| 67 | public abstract SystemUI bindRecents(Recents sysui); |
Robert Snoeberger | 81d7615 | 2019-09-30 15:43:34 -0400 | [diff] [blame] | 68 | |
Dave Mankoff | 33174bc | 2019-10-10 14:57:02 -0400 | [diff] [blame] | 69 | /** Inject into VolumeUI. */ |
| 70 | @Binds |
| 71 | @IntoMap |
| 72 | @ClassKey(VolumeUI.class) |
| 73 | public abstract SystemUI bindVolumeUI(VolumeUI sysui); |
| 74 | |
Dave Mankoff | aa8b7ae | 2019-09-04 18:03:21 -0400 | [diff] [blame] | 75 | } |