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.statusbar.phone.dagger; 18 19 import android.annotation.Nullable; 20 21 import com.android.keyguard.LockIconView; 22 import com.android.systemui.R; 23 import com.android.systemui.biometrics.AuthRippleView; 24 import com.android.systemui.statusbar.phone.NotificationPanelView; 25 import com.android.systemui.statusbar.phone.NotificationShadeWindowView; 26 import com.android.systemui.statusbar.phone.TapAgainView; 27 28 import dagger.Module; 29 import dagger.Provides; 30 31 @Module 32 public abstract class StatusBarViewModule { 33 /** */ 34 @Provides 35 @StatusBarComponent.StatusBarScope getNotificationPanelView( NotificationShadeWindowView notificationShadeWindowView)36 public static NotificationPanelView getNotificationPanelView( 37 NotificationShadeWindowView notificationShadeWindowView) { 38 return notificationShadeWindowView.getNotificationPanelView(); 39 } 40 41 /** */ 42 @Provides 43 @StatusBarComponent.StatusBarScope getLockIconView( NotificationShadeWindowView notificationShadeWindowView)44 public static LockIconView getLockIconView( 45 NotificationShadeWindowView notificationShadeWindowView) { 46 return notificationShadeWindowView.findViewById(R.id.lock_icon_view); 47 } 48 49 /** */ 50 @Provides 51 @StatusBarComponent.StatusBarScope 52 @Nullable getAuthRippleView( NotificationShadeWindowView notificationShadeWindowView)53 public static AuthRippleView getAuthRippleView( 54 NotificationShadeWindowView notificationShadeWindowView) { 55 return notificationShadeWindowView.findViewById(R.id.auth_ripple); 56 } 57 58 /** */ 59 @Provides 60 @StatusBarComponent.StatusBarScope getTapAgainView(NotificationPanelView npv)61 public static TapAgainView getTapAgainView(NotificationPanelView npv) { 62 return npv.getTapAgainView(); 63 } 64 } 65