blob: f18c8b2c3da62da7b471c9f3384b7388f66524d9 [file] [log] [blame]
Dave Mankoff94b82ab2019-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
17package com.android.systemui;
18
Govinda Wasserman3e7ce552019-08-13 11:35:44 -040019import static com.android.systemui.Dependency.ALLOW_NOTIFICATION_LONG_PRESS_NAME;
20
Dave Mankoff94b82ab2019-07-03 13:26:55 -040021import com.android.systemui.fragments.FragmentService;
22import com.android.systemui.statusbar.phone.StatusBar;
23import com.android.systemui.util.InjectionInflationController;
24import com.android.systemui.util.leak.GarbageMonitor;
25
Govinda Wasserman3e7ce552019-08-13 11:35:44 -040026import javax.inject.Named;
Dave Mankoff94b82ab2019-07-03 13:26:55 -040027import javax.inject.Singleton;
28
29import dagger.Component;
30
31/**
32 * Root component for Dagger injection.
33 */
34@Singleton
Govinda Wasserman3e7ce552019-08-13 11:35:44 -040035@Component(modules = {
36 DependencyProvider.class,
37 DependencyBinder.class,
38 ServiceBinder.class,
39 SystemUIFactory.ContextHolder.class,
40 SystemUIModule.class,
41 SystemUIDefaultModule.class})
Dave Mankoff94b82ab2019-07-03 13:26:55 -040042public interface SystemUIRootComponent {
43 /**
44 * Main dependency providing module.
45 */
46 @Singleton
47 Dependency.DependencyInjector createDependency();
48
49 /**
50 * Injects the StatusBar.
51 */
52 @Singleton
53 StatusBar.StatusBarInjector getStatusBarInjector();
54
55 /**
56 * FragmentCreator generates all Fragments that need injection.
57 */
58 @Singleton
59 FragmentService.FragmentCreator createFragmentCreator();
60
61 /**
62 * ViewCreator generates all Views that need injection.
63 */
64 InjectionInflationController.ViewCreator createViewCreator();
65
66 /**
67 * Creatse a GarbageMonitor.
68 */
69 @Singleton
70 GarbageMonitor createGarbageMonitor();
71
72 /**
Govinda Wasserman3e7ce552019-08-13 11:35:44 -040073 * Whether notification long press is allowed.
74 */
75 @Named(ALLOW_NOTIFICATION_LONG_PRESS_NAME)
76 boolean allowNotificationLongPressName();
77
78 /**
Dave Mankoff94b82ab2019-07-03 13:26:55 -040079 * Injects into the supplied argument.
80 */
81 void inject(SystemUIAppComponentFactory factory);
82}