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.Context; 20 21 import javax.inject.Singleton; 22 23 import dagger.BindsInstance; 24 import dagger.Component; 25 26 /** 27 * Root component for Dagger injection. 28 */ 29 @Singleton 30 @Component(modules = { 31 GlobalModule.class, 32 SysUISubcomponentModule.class, 33 WMModule.class}) 34 public interface GlobalRootComponent { 35 36 /** 37 * Builder for a GlobalRootComponent. 38 */ 39 @Component.Builder 40 interface Builder { 41 @BindsInstance context(Context context)42 Builder context(Context context); 43 build()44 GlobalRootComponent build(); 45 } 46 47 /** 48 * Builder for a WMComponent. 49 */ getWMComponentBuilder()50 WMComponent.Builder getWMComponentBuilder(); 51 52 /** 53 * Builder for a SysUIComponent. 54 */ getSysUIComponent()55 SysUIComponent.Builder getSysUIComponent(); 56 } 57