Loading packages/CarSystemUI/src/com/android/systemui/CarComponentBinder.java 0 → 100644 +32 −0 Original line number Diff line number Diff line /* * Copyright (C) 2019 The Android Open Source Project * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package com.android.systemui; import com.android.systemui.dagger.DefaultActivityBinder; import com.android.systemui.dagger.DefaultServiceBinder; import dagger.Module; /** * Supply Activities, Services, and SystemUI Objects for CarSystemUI. */ @Module(includes = { DefaultActivityBinder.class, DefaultServiceBinder.class, CarSystemUIBinder.class}) public class CarComponentBinder { } packages/CarSystemUI/src/com/android/systemui/CarSystemUIBinder.java +70 −1 Original line number Diff line number Diff line Loading @@ -16,7 +16,16 @@ package com.android.systemui; import com.android.systemui.keyguard.KeyguardViewMediator; import com.android.systemui.navigationbar.car.CarNavigationBar; import com.android.systemui.pip.PipUI; import com.android.systemui.power.PowerUI; import com.android.systemui.recents.Recents; import com.android.systemui.recents.RecentsModule; import com.android.systemui.statusbar.car.CarStatusBar; import com.android.systemui.statusbar.phone.StatusBar; import com.android.systemui.util.leak.GarbageMonitor; import com.android.systemui.volume.VolumeUI; import dagger.Binds; import dagger.Module; Loading @@ -24,11 +33,71 @@ import dagger.multibindings.ClassKey; import dagger.multibindings.IntoMap; /** Binder for car specific {@link SystemUI} modules. */ @Module @Module(includes = {RecentsModule.class}) public abstract class CarSystemUIBinder { /** */ @Binds @IntoMap @ClassKey(CarNavigationBar.class) public abstract SystemUI bindCarNavigationBar(CarNavigationBar sysui); /** Inject into GarbageMonitor.Service. */ @Binds @IntoMap @ClassKey(GarbageMonitor.Service.class) public abstract SystemUI bindGarbageMonitorService(GarbageMonitor.Service service); /** Inject into KeyguardViewMediator. */ @Binds @IntoMap @ClassKey(KeyguardViewMediator.class) public abstract SystemUI bindKeyguardViewMediator(KeyguardViewMediator sysui); /** Inject into LatencyTests. */ @Binds @IntoMap @ClassKey(LatencyTester.class) public abstract SystemUI bindLatencyTester(LatencyTester sysui); /** Inject into PipUI. */ @Binds @IntoMap @ClassKey(PipUI.class) public abstract SystemUI bindPipUI(PipUI sysui); /** Inject into PowerUI. */ @Binds @IntoMap @ClassKey(PowerUI.class) public abstract SystemUI bindPowerUI(PowerUI sysui); /** Inject into Recents. */ @Binds @IntoMap @ClassKey(Recents.class) public abstract SystemUI bindRecents(Recents sysui); /** Inject into ScreenDecorations. */ @Binds @IntoMap @ClassKey(ScreenDecorations.class) public abstract SystemUI bindScreenDecorations(ScreenDecorations sysui); /** Inject into StatusBar. */ @Binds @IntoMap @ClassKey(StatusBar.class) public abstract SystemUI bindsStatusBar(CarStatusBar sysui); /** Inject into StatusBarGoogle. */ @Binds @IntoMap @ClassKey(CarStatusBar.class) public abstract SystemUI bindsCarStatusBar(CarStatusBar sysui); /** Inject into VolumeUI. */ @Binds @IntoMap @ClassKey(VolumeUI.class) public abstract SystemUI bindVolumeUI(VolumeUI sysui); } packages/CarSystemUI/src/com/android/systemui/CarSystemUIModule.java +0 −7 Original line number Diff line number Diff line Loading @@ -46,8 +46,6 @@ import javax.inject.Singleton; import dagger.Binds; import dagger.Module; import dagger.Provides; import dagger.multibindings.ClassKey; import dagger.multibindings.IntoMap; @Module abstract class CarSystemUIModule { Loading Loading @@ -104,11 +102,6 @@ abstract class CarSystemUIModule { @Binds public abstract StatusBar bindStatusBar(CarStatusBar statusBar); @Binds @IntoMap @ClassKey(StatusBar.class) public abstract SystemUI providesStatusBar(CarStatusBar statusBar); @Binds abstract VolumeDialogComponent bindVolumeDialogComponent( CarVolumeDialogComponent carVolumeDialogComponent); Loading packages/CarSystemUI/src/com/android/systemui/CarSystemUIRootComponent.java +1 −0 Original line number Diff line number Diff line Loading @@ -29,6 +29,7 @@ import dagger.Component; @Singleton @Component( modules = { CarComponentBinder.class, DependencyProvider.class, DependencyBinder.class, SystemUIFactory.ContextHolder.class, Loading packages/SystemUI/src/com/android/systemui/dagger/ActivityBinder.java→packages/SystemUI/src/com/android/systemui/dagger/DefaultActivityBinder.java +1 −1 Original line number Diff line number Diff line Loading @@ -30,7 +30,7 @@ import dagger.multibindings.IntoMap; * Services and Activities that are injectable should go here. */ @Module public abstract class ActivityBinder { public abstract class DefaultActivityBinder { /** Inject into TunerActivity. */ @Binds @IntoMap Loading Loading
packages/CarSystemUI/src/com/android/systemui/CarComponentBinder.java 0 → 100644 +32 −0 Original line number Diff line number Diff line /* * Copyright (C) 2019 The Android Open Source Project * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package com.android.systemui; import com.android.systemui.dagger.DefaultActivityBinder; import com.android.systemui.dagger.DefaultServiceBinder; import dagger.Module; /** * Supply Activities, Services, and SystemUI Objects for CarSystemUI. */ @Module(includes = { DefaultActivityBinder.class, DefaultServiceBinder.class, CarSystemUIBinder.class}) public class CarComponentBinder { }
packages/CarSystemUI/src/com/android/systemui/CarSystemUIBinder.java +70 −1 Original line number Diff line number Diff line Loading @@ -16,7 +16,16 @@ package com.android.systemui; import com.android.systemui.keyguard.KeyguardViewMediator; import com.android.systemui.navigationbar.car.CarNavigationBar; import com.android.systemui.pip.PipUI; import com.android.systemui.power.PowerUI; import com.android.systemui.recents.Recents; import com.android.systemui.recents.RecentsModule; import com.android.systemui.statusbar.car.CarStatusBar; import com.android.systemui.statusbar.phone.StatusBar; import com.android.systemui.util.leak.GarbageMonitor; import com.android.systemui.volume.VolumeUI; import dagger.Binds; import dagger.Module; Loading @@ -24,11 +33,71 @@ import dagger.multibindings.ClassKey; import dagger.multibindings.IntoMap; /** Binder for car specific {@link SystemUI} modules. */ @Module @Module(includes = {RecentsModule.class}) public abstract class CarSystemUIBinder { /** */ @Binds @IntoMap @ClassKey(CarNavigationBar.class) public abstract SystemUI bindCarNavigationBar(CarNavigationBar sysui); /** Inject into GarbageMonitor.Service. */ @Binds @IntoMap @ClassKey(GarbageMonitor.Service.class) public abstract SystemUI bindGarbageMonitorService(GarbageMonitor.Service service); /** Inject into KeyguardViewMediator. */ @Binds @IntoMap @ClassKey(KeyguardViewMediator.class) public abstract SystemUI bindKeyguardViewMediator(KeyguardViewMediator sysui); /** Inject into LatencyTests. */ @Binds @IntoMap @ClassKey(LatencyTester.class) public abstract SystemUI bindLatencyTester(LatencyTester sysui); /** Inject into PipUI. */ @Binds @IntoMap @ClassKey(PipUI.class) public abstract SystemUI bindPipUI(PipUI sysui); /** Inject into PowerUI. */ @Binds @IntoMap @ClassKey(PowerUI.class) public abstract SystemUI bindPowerUI(PowerUI sysui); /** Inject into Recents. */ @Binds @IntoMap @ClassKey(Recents.class) public abstract SystemUI bindRecents(Recents sysui); /** Inject into ScreenDecorations. */ @Binds @IntoMap @ClassKey(ScreenDecorations.class) public abstract SystemUI bindScreenDecorations(ScreenDecorations sysui); /** Inject into StatusBar. */ @Binds @IntoMap @ClassKey(StatusBar.class) public abstract SystemUI bindsStatusBar(CarStatusBar sysui); /** Inject into StatusBarGoogle. */ @Binds @IntoMap @ClassKey(CarStatusBar.class) public abstract SystemUI bindsCarStatusBar(CarStatusBar sysui); /** Inject into VolumeUI. */ @Binds @IntoMap @ClassKey(VolumeUI.class) public abstract SystemUI bindVolumeUI(VolumeUI sysui); }
packages/CarSystemUI/src/com/android/systemui/CarSystemUIModule.java +0 −7 Original line number Diff line number Diff line Loading @@ -46,8 +46,6 @@ import javax.inject.Singleton; import dagger.Binds; import dagger.Module; import dagger.Provides; import dagger.multibindings.ClassKey; import dagger.multibindings.IntoMap; @Module abstract class CarSystemUIModule { Loading Loading @@ -104,11 +102,6 @@ abstract class CarSystemUIModule { @Binds public abstract StatusBar bindStatusBar(CarStatusBar statusBar); @Binds @IntoMap @ClassKey(StatusBar.class) public abstract SystemUI providesStatusBar(CarStatusBar statusBar); @Binds abstract VolumeDialogComponent bindVolumeDialogComponent( CarVolumeDialogComponent carVolumeDialogComponent); Loading
packages/CarSystemUI/src/com/android/systemui/CarSystemUIRootComponent.java +1 −0 Original line number Diff line number Diff line Loading @@ -29,6 +29,7 @@ import dagger.Component; @Singleton @Component( modules = { CarComponentBinder.class, DependencyProvider.class, DependencyBinder.class, SystemUIFactory.ContextHolder.class, Loading
packages/SystemUI/src/com/android/systemui/dagger/ActivityBinder.java→packages/SystemUI/src/com/android/systemui/dagger/DefaultActivityBinder.java +1 −1 Original line number Diff line number Diff line Loading @@ -30,7 +30,7 @@ import dagger.multibindings.IntoMap; * Services and Activities that are injectable should go here. */ @Module public abstract class ActivityBinder { public abstract class DefaultActivityBinder { /** Inject into TunerActivity. */ @Binds @IntoMap Loading