blob: 83d956c22fb828f4e7b2e4e061d270a030b8a5fd [file] [log] [blame]
Dave Mankoff2ea5a832019-07-03 13:26:55 -04001/*
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 Mankofff4736812019-10-18 17:25:50 -040017package com.android.systemui.dagger;
Dave Mankoff2ea5a832019-07-03 13:26:55 -040018
Govinda Wasserman2e86fb62019-08-13 11:35:44 -040019import static com.android.systemui.Dependency.ALLOW_NOTIFICATION_LONG_PRESS_NAME;
20
Hyunyoung Song8f9d34c2019-08-30 14:47:43 -070021import android.content.ContentProvider;
22
Dave Mankofff4736812019-10-18 17:25:50 -040023import com.android.systemui.Dependency;
24import com.android.systemui.SystemUIAppComponentFactory;
25import com.android.systemui.SystemUIFactory;
Dave Mankoff2ea5a832019-07-03 13:26:55 -040026import com.android.systemui.fragments.FragmentService;
27import com.android.systemui.statusbar.phone.StatusBar;
28import com.android.systemui.util.InjectionInflationController;
Dave Mankoff2ea5a832019-07-03 13:26:55 -040029
Govinda Wasserman2e86fb62019-08-13 11:35:44 -040030import javax.inject.Named;
Dave Mankoff2ea5a832019-07-03 13:26:55 -040031import javax.inject.Singleton;
32
33import dagger.Component;
34
35/**
36 * Root component for Dagger injection.
37 */
38@Singleton
Govinda Wasserman2e86fb62019-08-13 11:35:44 -040039@Component(modules = {
Dave Mankoffae8ec452019-10-29 15:50:02 -040040 DefaultComponentBinder.class,
Govinda Wasserman2e86fb62019-08-13 11:35:44 -040041 DependencyProvider.class,
42 DependencyBinder.class,
Dave Mankofff4736812019-10-18 17:25:50 -040043 SystemServicesModule.class,
Govinda Wasserman2e86fb62019-08-13 11:35:44 -040044 SystemUIFactory.ContextHolder.class,
45 SystemUIModule.class,
46 SystemUIDefaultModule.class})
Dave Mankoff2ea5a832019-07-03 13:26:55 -040047public interface SystemUIRootComponent {
Dave Mankoffaa8b7ae2019-09-04 18:03:21 -040048
49 /**
Robert Snoeberger81d76152019-09-30 15:43:34 -040050 * Creates a ContextComponentHelper.
Dave Mankoffaa8b7ae2019-09-04 18:03:21 -040051 */
52 @Singleton
53 ContextComponentHelper getContextComponentHelper();
54
Dave Mankoff2ea5a832019-07-03 13:26:55 -040055 /**
56 * Main dependency providing module.
57 */
58 @Singleton
59 Dependency.DependencyInjector createDependency();
60
61 /**
62 * Injects the StatusBar.
63 */
64 @Singleton
65 StatusBar.StatusBarInjector getStatusBarInjector();
66
67 /**
68 * FragmentCreator generates all Fragments that need injection.
69 */
70 @Singleton
71 FragmentService.FragmentCreator createFragmentCreator();
72
73 /**
74 * ViewCreator generates all Views that need injection.
75 */
76 InjectionInflationController.ViewCreator createViewCreator();
77
78 /**
Govinda Wasserman2e86fb62019-08-13 11:35:44 -040079 * Whether notification long press is allowed.
80 */
81 @Named(ALLOW_NOTIFICATION_LONG_PRESS_NAME)
82 boolean allowNotificationLongPressName();
83
84 /**
Dave Mankoffa4a71362019-08-27 14:40:05 -040085 * Member injection into the supplied argument.
Dave Mankoff2ea5a832019-07-03 13:26:55 -040086 */
87 void inject(SystemUIAppComponentFactory factory);
Dave Mankoffa4a71362019-08-27 14:40:05 -040088
89 /**
90 * Member injection into the supplied argument.
91 */
92 void inject(ContentProvider contentProvider);
Dave Mankoff2ea5a832019-07-03 13:26:55 -040093}