1 /* 2 * Copyright (C) 2020 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.keyguard.dagger; 18 19 import android.view.Display; 20 21 import com.android.keyguard.KeyguardClockSwitchController; 22 import com.android.keyguard.KeyguardStatusView; 23 import com.android.keyguard.KeyguardStatusViewController; 24 25 import dagger.BindsInstance; 26 import dagger.Subcomponent; 27 28 /** 29 * Subcomponent for helping work with KeyguardStatusView and its children. 30 * 31 * TODO: unify this with {@link KeyguardStatusBarViewComponent} 32 */ 33 @Subcomponent(modules = {KeyguardStatusViewModule.class, KeyguardDisplayModule.class}) 34 @KeyguardStatusViewScope 35 public interface KeyguardStatusViewComponent { 36 /** Simple factory for {@link KeyguardStatusViewComponent}. */ 37 @Subcomponent.Factory 38 interface Factory { 39 /** Creates {@link KeyguardStatusViewComponent} for a given display. */ build( @indsInstance KeyguardStatusView presentation, @BindsInstance Display display )40 KeyguardStatusViewComponent build( 41 @BindsInstance KeyguardStatusView presentation, 42 @BindsInstance Display display 43 ); 44 } 45 46 /** Builds a {@link com.android.keyguard.KeyguardClockSwitchController}. */ getKeyguardClockSwitchController()47 KeyguardClockSwitchController getKeyguardClockSwitchController(); 48 49 /** Builds a {@link com.android.keyguard.KeyguardStatusViewController}. */ getKeyguardStatusViewController()50 KeyguardStatusViewController getKeyguardStatusViewController(); 51 } 52