blob: 8e8b7f37b8d6c99b84c2db45af830b259f68b6c7 [file] [log] [blame]
Dave Mankofff5019142019-12-20 16:22:57 -05001/*
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.pip.tv.dagger;
18
19import static java.lang.annotation.RetentionPolicy.RUNTIME;
20
21import com.android.systemui.pip.tv.PipControlsView;
22import com.android.systemui.pip.tv.PipControlsViewController;
23import com.android.systemui.statusbar.phone.dagger.StatusBarComponent;
24
25import java.lang.annotation.Documented;
26import java.lang.annotation.Retention;
27
28import javax.inject.Scope;
29
30import dagger.BindsInstance;
31import dagger.Subcomponent;
32
33/**
34 * Component for injecting into Pip related classes.
35 */
36@Subcomponent
37public interface TvPipComponent {
38 /**
39 * Builder for {@link StatusBarComponent}.
40 */
41 @Subcomponent.Builder
42 interface Builder {
43 @BindsInstance
44 TvPipComponent.Builder pipControlsView(PipControlsView pipControlsView);
45 TvPipComponent build();
46 }
47
48 /**
49 * Scope annotation for singleton items within the PipComponent.
50 */
51 @Documented
52 @Retention(RUNTIME)
53 @Scope
54 @interface PipScope {}
55
56 /**
57 * Creates a StatusBarWindowViewController.
58 */
59 @TvPipComponent.PipScope
60 PipControlsViewController getPipControlsViewController();
61}