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; 18 19 import com.android.systemui.car.wm.scalableui.EventDispatcher; 20 import com.android.systemui.car.wm.scalableui.ScalableUIWMInitializer; 21 import com.android.systemui.car.wm.scalableui.panel.TaskPanelInfoRepository; 22 import com.android.systemui.dagger.DependencyProvider; 23 import com.android.systemui.dagger.SysUIComponent; 24 import com.android.systemui.dagger.SysUISingleton; 25 import com.android.systemui.dagger.SystemUIModule; 26 import com.android.systemui.scene.ShadelessSceneContainerFrameworkModule; 27 import com.android.wm.shell.RootTaskDisplayAreaOrganizer; 28 29 import dagger.BindsInstance; 30 import dagger.Subcomponent; 31 32 import java.util.Optional; 33 34 /** 35 * Dagger Subcomponent for Core SysUI. 36 */ 37 @SysUISingleton 38 @Subcomponent(modules = { 39 CarComponentBinder.class, 40 DependencyProvider.class, 41 SystemUIModule.class, 42 CarSystemUICoreStartableModule.class, 43 CarSystemUIModule.class, 44 CarSystemUIBinder.class, 45 ShadelessSceneContainerFrameworkModule.class}) 46 public interface CarSysUIComponent extends SysUIComponent { 47 48 /** 49 * Builder for a CarSysUIComponent. 50 */ 51 @Subcomponent.Builder 52 interface Builder extends SysUIComponent.Builder { 53 @BindsInstance setRootTaskDisplayAreaOrganizer(Optional<RootTaskDisplayAreaOrganizer> r)54 Builder setRootTaskDisplayAreaOrganizer(Optional<RootTaskDisplayAreaOrganizer> r); 55 56 /** 57 * Sets an optional {@link ScalableUIWMInitializer} for the builder. 58 */ 59 @BindsInstance setScalableUIWMInitializer(Optional<ScalableUIWMInitializer> initializer)60 Builder setScalableUIWMInitializer(Optional<ScalableUIWMInitializer> initializer); 61 62 /** 63 * Sets the ScalableUI {@link TaskPanelInfoRepository} for the builder. 64 */ 65 @BindsInstance setTaskPanelInfoRepository(TaskPanelInfoRepository repository)66 Builder setTaskPanelInfoRepository(TaskPanelInfoRepository repository); 67 68 /** 69 * Sets the ScalableUI {@link EventDispatcher} for the builder. 70 */ 71 @BindsInstance setScalableUIEventDispatcher(EventDispatcher dispatcher)72 Builder setScalableUIEventDispatcher(EventDispatcher dispatcher); 73 build()74 CarSysUIComponent build(); 75 } 76 } 77