1 /* 2 * Copyright (C) 2024 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.car.keyguard; 18 19 import android.content.Context; 20 21 import com.android.keyguard.ConnectedDisplayKeyguardPresentation; 22 import com.android.keyguard.KeyguardDisplayManager; 23 import com.android.systemui.dagger.SysUISingleton; 24 import com.android.systemui.dagger.qualifiers.Application; 25 import com.android.systemui.navigationbar.NavigationBarController; 26 import com.android.systemui.settings.DisplayTracker; 27 import com.android.systemui.shade.data.repository.ShadeDisplaysRepository; 28 import com.android.systemui.statusbar.policy.KeyguardStateController; 29 30 import dagger.Lazy; 31 32 import java.util.concurrent.Executor; 33 34 import javax.inject.Provider; 35 36 import kotlinx.coroutines.CoroutineScope; 37 38 /** 39 * Implementation of the {@link KeyguardDisplayManager} that provides different display tracker 40 * implementations depending on the system. 41 * 42 * For the driver SystemUI instance on a MUMD system, the default DisplayTrackerImpl is provided 43 * in place of the MUMD display tracker so that when the driver is locked, the 44 * KeyguardDisplayManager can be aware of all displays on the system, not just the driver displays. 45 * In all other cases, the default display tracker provided by dagger will be used. 46 */ 47 @SysUISingleton 48 public class CarKeyguardDisplayManager extends KeyguardDisplayManager { CarKeyguardDisplayManager(Context context, Lazy<NavigationBarController> navigationBarControllerLazy, DisplayTracker displayTracker, Executor mainExecutor, Executor uiBgExecutor, KeyguardDisplayManager.DeviceStateHelper deviceStateHelper, KeyguardStateController keyguardStateController, ConnectedDisplayKeyguardPresentation.Factory connectedDisplayKeyguardPresentationFactory, Provider<ShadeDisplaysRepository> shadeDisplaysRepositoryProvider, @Application CoroutineScope appScope)49 public CarKeyguardDisplayManager(Context context, 50 Lazy<NavigationBarController> navigationBarControllerLazy, 51 DisplayTracker displayTracker, 52 Executor mainExecutor, Executor uiBgExecutor, 53 KeyguardDisplayManager.DeviceStateHelper deviceStateHelper, 54 KeyguardStateController keyguardStateController, 55 ConnectedDisplayKeyguardPresentation.Factory 56 connectedDisplayKeyguardPresentationFactory, 57 Provider<ShadeDisplaysRepository> shadeDisplaysRepositoryProvider, 58 @Application CoroutineScope appScope) { 59 super(context, navigationBarControllerLazy, displayTracker, mainExecutor, uiBgExecutor, 60 deviceStateHelper, keyguardStateController, 61 connectedDisplayKeyguardPresentationFactory, shadeDisplaysRepositoryProvider, 62 appScope); 63 } 64 } 65