diff options
| author | 2024-11-13 15:06:19 +0000 | |
|---|---|---|
| committer | 2024-11-13 15:06:19 +0000 | |
| commit | 8bbc20f0d0b7838086606c3a1baf8e7edff91bce (patch) | |
| tree | 847e6a8536fe679895a010e7744eaf9eba2ac2bf | |
| parent | 1f5e0e1271244037e635d3e59538dc92a3494edc (diff) | |
| parent | ab93fff4931115d5eef7135f978204d57c7e58f5 (diff) | |
Merge "Ensure Keyguard classes use display-aware context" into main
49 files changed, 93 insertions, 56 deletions
diff --git a/packages/SystemUI/multivalentTests/src/com/android/systemui/keyguard/data/repository/KeyguardSmartspaceRepositoryImplTest.kt b/packages/SystemUI/multivalentTests/src/com/android/systemui/keyguard/data/repository/KeyguardSmartspaceRepositoryImplTest.kt index 5a597fe8e920..f537e32ac13d 100644 --- a/packages/SystemUI/multivalentTests/src/com/android/systemui/keyguard/data/repository/KeyguardSmartspaceRepositoryImplTest.kt +++ b/packages/SystemUI/multivalentTests/src/com/android/systemui/keyguard/data/repository/KeyguardSmartspaceRepositoryImplTest.kt @@ -50,7 +50,6 @@ class KeyguardSmartspaceRepositoryImplTest : SysuiTestCase() { fakeSettings.userId = fakeUserTracker.userId underTest = KeyguardSmartspaceRepositoryImpl( - context = context, secureSettings = fakeSettings, userTracker = fakeUserTracker, applicationScope = scope.backgroundScope, diff --git a/packages/SystemUI/multivalentTests/src/com/android/systemui/keyguard/domain/interactor/KeyguardTouchHandlingInteractorTest.kt b/packages/SystemUI/multivalentTests/src/com/android/systemui/keyguard/domain/interactor/KeyguardTouchHandlingInteractorTest.kt index aee72de22a24..28ac169e2bbe 100644 --- a/packages/SystemUI/multivalentTests/src/com/android/systemui/keyguard/domain/interactor/KeyguardTouchHandlingInteractorTest.kt +++ b/packages/SystemUI/multivalentTests/src/com/android/systemui/keyguard/domain/interactor/KeyguardTouchHandlingInteractorTest.kt @@ -310,7 +310,7 @@ class KeyguardTouchHandlingInteractorTest : SysuiTestCase() { // read during initialization to set up flows. Maybe there is a better way to handle that. underTest = KeyguardTouchHandlingInteractor( - appContext = mContext, + context = mContext, scope = testScope.backgroundScope, transitionInteractor = kosmos.keyguardTransitionInteractor, repository = keyguardRepository, diff --git a/packages/SystemUI/src/com/android/systemui/keyguard/KeyguardViewConfigurator.kt b/packages/SystemUI/src/com/android/systemui/keyguard/KeyguardViewConfigurator.kt index 2d056001b669..5ec6d37207b5 100644 --- a/packages/SystemUI/src/com/android/systemui/keyguard/KeyguardViewConfigurator.kt +++ b/packages/SystemUI/src/com/android/systemui/keyguard/KeyguardViewConfigurator.kt @@ -95,7 +95,7 @@ constructor( private val keyguardBlueprintViewModel: KeyguardBlueprintViewModel, private val keyguardStatusViewComponentFactory: KeyguardStatusViewComponent.Factory, @ShadeDisplayAware private val configuration: ConfigurationState, - private val context: Context, + @ShadeDisplayAware private val context: Context, private val keyguardIndicationController: KeyguardIndicationController, private val shadeInteractor: ShadeInteractor, private val interactionJankMonitor: InteractionJankMonitor, diff --git a/packages/SystemUI/src/com/android/systemui/keyguard/WakefulnessLifecycle.java b/packages/SystemUI/src/com/android/systemui/keyguard/WakefulnessLifecycle.java index 39144b56adc7..c0ffda6640b2 100644 --- a/packages/SystemUI/src/com/android/systemui/keyguard/WakefulnessLifecycle.java +++ b/packages/SystemUI/src/com/android/systemui/keyguard/WakefulnessLifecycle.java @@ -34,6 +34,7 @@ import com.android.systemui.dagger.SysUISingleton; import com.android.systemui.dump.DumpManager; import com.android.systemui.power.domain.interactor.PowerInteractor; import com.android.systemui.res.R; +import com.android.systemui.shade.ShadeDisplayAware; import com.android.systemui.util.time.SystemClock; import java.io.PrintWriter; @@ -91,7 +92,7 @@ public class WakefulnessLifecycle extends Lifecycle<WakefulnessLifecycle.Observe @Inject public WakefulnessLifecycle( - Context context, + @ShadeDisplayAware Context context, @Nullable IWallpaperManager wallpaperManagerService, SystemClock systemClock, DumpManager dumpManager) { diff --git a/packages/SystemUI/src/com/android/systemui/keyguard/WindowManagerOcclusionManager.kt b/packages/SystemUI/src/com/android/systemui/keyguard/WindowManagerOcclusionManager.kt index 585bd6adf11f..4bac8f7a1b47 100644 --- a/packages/SystemUI/src/com/android/systemui/keyguard/WindowManagerOcclusionManager.kt +++ b/packages/SystemUI/src/com/android/systemui/keyguard/WindowManagerOcclusionManager.kt @@ -46,6 +46,7 @@ import com.android.systemui.keyguard.shared.model.KeyguardState import com.android.systemui.keyguard.ui.viewmodel.DreamingToLockscreenTransitionViewModel import com.android.systemui.power.domain.interactor.PowerInteractor import com.android.systemui.res.R +import com.android.systemui.shade.ShadeDisplayAware import java.util.concurrent.Executor import javax.inject.Inject @@ -83,7 +84,7 @@ constructor( val activityTransitionAnimator: ActivityTransitionAnimator, val keyguardViewController: dagger.Lazy<KeyguardViewController>, val powerInteractor: PowerInteractor, - val context: Context, + @ShadeDisplayAware val context: Context, val interactionJankMonitor: InteractionJankMonitor, @Main executor: Executor, val dreamingToLockscreenTransitionViewModel: DreamingToLockscreenTransitionViewModel, diff --git a/packages/SystemUI/src/com/android/systemui/keyguard/dagger/KeyguardModule.java b/packages/SystemUI/src/com/android/systemui/keyguard/dagger/KeyguardModule.java index 7638079d7475..0101e099084e 100644 --- a/packages/SystemUI/src/com/android/systemui/keyguard/dagger/KeyguardModule.java +++ b/packages/SystemUI/src/com/android/systemui/keyguard/dagger/KeyguardModule.java @@ -68,6 +68,7 @@ import com.android.systemui.navigationbar.NavigationModeController; import com.android.systemui.process.ProcessWrapper; import com.android.systemui.settings.UserTracker; import com.android.systemui.shade.ShadeController; +import com.android.systemui.shade.ShadeDisplayAware; import com.android.systemui.statusbar.NotificationShadeDepthController; import com.android.systemui.statusbar.NotificationShadeWindowController; import com.android.systemui.statusbar.SysuiStatusBarStateController; @@ -126,7 +127,7 @@ public interface KeyguardModule { @Provides @SysUISingleton static KeyguardViewMediator newKeyguardViewMediator( - Context context, + @ShadeDisplayAware Context context, UiEventLogger uiEventLogger, SessionTracker sessionTracker, UserTracker userTracker, diff --git a/packages/SystemUI/src/com/android/systemui/keyguard/data/quickaffordance/CameraQuickAffordanceConfig.kt b/packages/SystemUI/src/com/android/systemui/keyguard/data/quickaffordance/CameraQuickAffordanceConfig.kt index 77e8179195a1..74ee052f12b9 100644 --- a/packages/SystemUI/src/com/android/systemui/keyguard/data/quickaffordance/CameraQuickAffordanceConfig.kt +++ b/packages/SystemUI/src/com/android/systemui/keyguard/data/quickaffordance/CameraQuickAffordanceConfig.kt @@ -27,9 +27,9 @@ import com.android.systemui.camera.CameraGestureHelper import com.android.systemui.common.shared.model.ContentDescription import com.android.systemui.common.shared.model.Icon import com.android.systemui.dagger.SysUISingleton -import com.android.systemui.dagger.qualifiers.Application import com.android.systemui.dagger.qualifiers.Background import com.android.systemui.settings.UserTracker +import com.android.systemui.shade.ShadeDisplayAware import dagger.Lazy import javax.inject.Inject import kotlinx.coroutines.CoroutineDispatcher @@ -41,7 +41,7 @@ import kotlinx.coroutines.withContext class CameraQuickAffordanceConfig @Inject constructor( - @Application private val context: Context, + @ShadeDisplayAware private val context: Context, private val packageManager: PackageManager, private val cameraGestureHelper: Lazy<CameraGestureHelper>, private val userTracker: UserTracker, diff --git a/packages/SystemUI/src/com/android/systemui/keyguard/data/quickaffordance/DoNotDisturbQuickAffordanceConfig.kt b/packages/SystemUI/src/com/android/systemui/keyguard/data/quickaffordance/DoNotDisturbQuickAffordanceConfig.kt index be873344b719..d1f9fa259c6b 100644 --- a/packages/SystemUI/src/com/android/systemui/keyguard/data/quickaffordance/DoNotDisturbQuickAffordanceConfig.kt +++ b/packages/SystemUI/src/com/android/systemui/keyguard/data/quickaffordance/DoNotDisturbQuickAffordanceConfig.kt @@ -40,6 +40,7 @@ import com.android.systemui.keyguard.shared.quickaffordance.ActivationState import com.android.systemui.modes.shared.ModesUi import com.android.systemui.res.R import com.android.systemui.settings.UserTracker +import com.android.systemui.shade.ShadeDisplayAware import com.android.systemui.statusbar.policy.ZenModeController import com.android.systemui.statusbar.policy.domain.interactor.ZenModeInteractor import com.android.systemui.util.settings.SecureSettings @@ -75,7 +76,7 @@ constructor( @Inject constructor( - context: Context, + @ShadeDisplayAware context: Context, controller: ZenModeController, interactor: ZenModeInteractor, secureSettings: SecureSettings, diff --git a/packages/SystemUI/src/com/android/systemui/keyguard/data/quickaffordance/FlashlightQuickAffordanceConfig.kt b/packages/SystemUI/src/com/android/systemui/keyguard/data/quickaffordance/FlashlightQuickAffordanceConfig.kt index a7999c192643..480ef5e19d8e 100644 --- a/packages/SystemUI/src/com/android/systemui/keyguard/data/quickaffordance/FlashlightQuickAffordanceConfig.kt +++ b/packages/SystemUI/src/com/android/systemui/keyguard/data/quickaffordance/FlashlightQuickAffordanceConfig.kt @@ -27,6 +27,7 @@ import com.android.systemui.common.shared.model.Icon import com.android.systemui.dagger.SysUISingleton import com.android.systemui.dagger.qualifiers.Application import com.android.systemui.keyguard.shared.quickaffordance.ActivationState +import com.android.systemui.shade.ShadeDisplayAware import com.android.systemui.statusbar.policy.FlashlightController import javax.inject.Inject import kotlinx.coroutines.channels.awaitClose @@ -36,7 +37,7 @@ import kotlinx.coroutines.flow.Flow class FlashlightQuickAffordanceConfig @Inject constructor( - @Application private val context: Context, + @ShadeDisplayAware private val context: Context, private val flashlightController: FlashlightController, ) : KeyguardQuickAffordanceConfig { diff --git a/packages/SystemUI/src/com/android/systemui/keyguard/data/quickaffordance/HomeControlsKeyguardQuickAffordanceConfig.kt b/packages/SystemUI/src/com/android/systemui/keyguard/data/quickaffordance/HomeControlsKeyguardQuickAffordanceConfig.kt index cc36961ff973..3555f06ce96f 100644 --- a/packages/SystemUI/src/com/android/systemui/keyguard/data/quickaffordance/HomeControlsKeyguardQuickAffordanceConfig.kt +++ b/packages/SystemUI/src/com/android/systemui/keyguard/data/quickaffordance/HomeControlsKeyguardQuickAffordanceConfig.kt @@ -36,6 +36,7 @@ import com.android.systemui.controls.ui.ControlsUiController import com.android.systemui.dagger.SysUISingleton import com.android.systemui.dagger.qualifiers.Application import com.android.systemui.keyguard.data.quickaffordance.KeyguardQuickAffordanceConfig.Companion.appStoreIntent +import com.android.systemui.shade.ShadeDisplayAware import com.android.systemui.util.kotlin.getOrNull import javax.inject.Inject import kotlinx.coroutines.channels.awaitClose @@ -48,7 +49,7 @@ import kotlinx.coroutines.flow.flowOf class HomeControlsKeyguardQuickAffordanceConfig @Inject constructor( - @Application private val context: Context, + @ShadeDisplayAware private val context: Context, private val component: ControlsComponent, ) : KeyguardQuickAffordanceConfig { diff --git a/packages/SystemUI/src/com/android/systemui/keyguard/data/quickaffordance/KeyguardQuickAffordanceLocalUserSelectionManager.kt b/packages/SystemUI/src/com/android/systemui/keyguard/data/quickaffordance/KeyguardQuickAffordanceLocalUserSelectionManager.kt index 796374aadc1a..f08576abc44f 100644 --- a/packages/SystemUI/src/com/android/systemui/keyguard/data/quickaffordance/KeyguardQuickAffordanceLocalUserSelectionManager.kt +++ b/packages/SystemUI/src/com/android/systemui/keyguard/data/quickaffordance/KeyguardQuickAffordanceLocalUserSelectionManager.kt @@ -29,6 +29,7 @@ import com.android.systemui.dagger.qualifiers.Application import com.android.systemui.res.R import com.android.systemui.settings.UserFileManager import com.android.systemui.settings.UserTracker +import com.android.systemui.shade.ShadeDisplayAware import javax.inject.Inject import kotlinx.coroutines.ExperimentalCoroutinesApi import kotlinx.coroutines.channels.awaitClose @@ -47,7 +48,7 @@ import kotlinx.coroutines.flow.onStart class KeyguardQuickAffordanceLocalUserSelectionManager @Inject constructor( - @Application private val context: Context, + @ShadeDisplayAware private val context: Context, private val userFileManager: UserFileManager, private val userTracker: UserTracker, broadcastDispatcher: BroadcastDispatcher, diff --git a/packages/SystemUI/src/com/android/systemui/keyguard/data/quickaffordance/MuteQuickAffordanceConfig.kt b/packages/SystemUI/src/com/android/systemui/keyguard/data/quickaffordance/MuteQuickAffordanceConfig.kt index 6c1bdad98251..1358634a55f8 100644 --- a/packages/SystemUI/src/com/android/systemui/keyguard/data/quickaffordance/MuteQuickAffordanceConfig.kt +++ b/packages/SystemUI/src/com/android/systemui/keyguard/data/quickaffordance/MuteQuickAffordanceConfig.kt @@ -33,6 +33,7 @@ import com.android.systemui.keyguard.shared.quickaffordance.ActivationState import com.android.systemui.res.R import com.android.systemui.settings.UserFileManager import com.android.systemui.settings.UserTracker +import com.android.systemui.shade.ShadeDisplayAware import com.android.systemui.util.RingerModeTracker import javax.inject.Inject import kotlinx.coroutines.CoroutineDispatcher @@ -51,7 +52,7 @@ import kotlinx.coroutines.withContext class MuteQuickAffordanceConfig @Inject constructor( - private val context: Context, + @ShadeDisplayAware private val context: Context, private val userTracker: UserTracker, private val userFileManager: UserFileManager, private val ringerModeTracker: RingerModeTracker, diff --git a/packages/SystemUI/src/com/android/systemui/keyguard/data/quickaffordance/QrCodeScannerKeyguardQuickAffordanceConfig.kt b/packages/SystemUI/src/com/android/systemui/keyguard/data/quickaffordance/QrCodeScannerKeyguardQuickAffordanceConfig.kt index a503541dcf59..d12c42a754f0 100644 --- a/packages/SystemUI/src/com/android/systemui/keyguard/data/quickaffordance/QrCodeScannerKeyguardQuickAffordanceConfig.kt +++ b/packages/SystemUI/src/com/android/systemui/keyguard/data/quickaffordance/QrCodeScannerKeyguardQuickAffordanceConfig.kt @@ -27,6 +27,7 @@ import com.android.systemui.common.shared.model.Icon import com.android.systemui.dagger.SysUISingleton import com.android.systemui.dagger.qualifiers.Application import com.android.systemui.qrcodescanner.controller.QRCodeScannerController +import com.android.systemui.shade.ShadeDisplayAware import javax.inject.Inject import kotlinx.coroutines.channels.awaitClose import kotlinx.coroutines.flow.Flow @@ -36,7 +37,7 @@ import kotlinx.coroutines.flow.Flow class QrCodeScannerKeyguardQuickAffordanceConfig @Inject constructor( - @Application private val context: Context, + @ShadeDisplayAware private val context: Context, private val controller: QRCodeScannerController, ) : KeyguardQuickAffordanceConfig { diff --git a/packages/SystemUI/src/com/android/systemui/keyguard/data/quickaffordance/QuickAccessWalletKeyguardQuickAffordanceConfig.kt b/packages/SystemUI/src/com/android/systemui/keyguard/data/quickaffordance/QuickAccessWalletKeyguardQuickAffordanceConfig.kt index 56b520ed6206..eafa1cea59f3 100644 --- a/packages/SystemUI/src/com/android/systemui/keyguard/data/quickaffordance/QuickAccessWalletKeyguardQuickAffordanceConfig.kt +++ b/packages/SystemUI/src/com/android/systemui/keyguard/data/quickaffordance/QuickAccessWalletKeyguardQuickAffordanceConfig.kt @@ -34,6 +34,7 @@ import com.android.systemui.dagger.qualifiers.Application import com.android.systemui.dagger.qualifiers.Background import com.android.systemui.plugins.ActivityStarter import com.android.systemui.res.R +import com.android.systemui.shade.ShadeDisplayAware import com.android.systemui.wallet.controller.QuickAccessWalletController import com.android.systemui.wallet.util.getPaymentCards import javax.inject.Inject @@ -51,7 +52,7 @@ import kotlinx.coroutines.withContext class QuickAccessWalletKeyguardQuickAffordanceConfig @Inject constructor( - @Application private val context: Context, + @ShadeDisplayAware private val context: Context, @Background private val backgroundDispatcher: CoroutineDispatcher, private val walletController: QuickAccessWalletController, private val activityStarter: ActivityStarter, diff --git a/packages/SystemUI/src/com/android/systemui/keyguard/data/quickaffordance/VideoCameraQuickAffordanceConfig.kt b/packages/SystemUI/src/com/android/systemui/keyguard/data/quickaffordance/VideoCameraQuickAffordanceConfig.kt index 3e6e3b79a820..ceaeeca4ea2a 100644 --- a/packages/SystemUI/src/com/android/systemui/keyguard/data/quickaffordance/VideoCameraQuickAffordanceConfig.kt +++ b/packages/SystemUI/src/com/android/systemui/keyguard/data/quickaffordance/VideoCameraQuickAffordanceConfig.kt @@ -32,6 +32,7 @@ import com.android.systemui.dagger.SysUISingleton import com.android.systemui.dagger.qualifiers.Application import com.android.systemui.dagger.qualifiers.Background import com.android.systemui.settings.UserTracker +import com.android.systemui.shade.ShadeDisplayAware import javax.inject.Inject import kotlinx.coroutines.CoroutineDispatcher import kotlinx.coroutines.flow.Flow @@ -42,7 +43,7 @@ import kotlinx.coroutines.withContext class VideoCameraQuickAffordanceConfig @Inject constructor( - @Application private val context: Context, + @ShadeDisplayAware private val context: Context, private val cameraIntents: CameraIntentsWrapper, private val activityIntentHelper: ActivityIntentHelper, private val userTracker: UserTracker, diff --git a/packages/SystemUI/src/com/android/systemui/keyguard/data/repository/BiometricSettingsRepository.kt b/packages/SystemUI/src/com/android/systemui/keyguard/data/repository/BiometricSettingsRepository.kt index dd3e6190ceaf..ab8cc7125d6e 100644 --- a/packages/SystemUI/src/com/android/systemui/keyguard/data/repository/BiometricSettingsRepository.kt +++ b/packages/SystemUI/src/com/android/systemui/keyguard/data/repository/BiometricSettingsRepository.kt @@ -40,6 +40,7 @@ import com.android.systemui.dump.DumpManager import com.android.systemui.keyguard.shared.model.AuthenticationFlags import com.android.systemui.keyguard.shared.model.DevicePosture import com.android.systemui.res.R +import com.android.systemui.shade.ShadeDisplayAware import com.android.systemui.statusbar.pipeline.mobile.data.repository.MobileConnectionsRepository import com.android.systemui.user.data.repository.UserRepository import java.io.PrintWriter @@ -123,7 +124,7 @@ private const val TAG = "BiometricsRepositoryImpl" class BiometricSettingsRepositoryImpl @Inject constructor( - context: Context, + @ShadeDisplayAware context: Context, lockPatternUtils: LockPatternUtils, broadcastDispatcher: BroadcastDispatcher, authController: AuthController, @@ -354,7 +355,10 @@ constructor( } @OptIn(ExperimentalCoroutinesApi::class) -private class StrongAuthTracker(private val userRepository: UserRepository, context: Context?) : +private class StrongAuthTracker( + private val userRepository: UserRepository, + @ShadeDisplayAware context: Context? +) : LockPatternUtils.StrongAuthTracker(context) { private val selectedUserId = diff --git a/packages/SystemUI/src/com/android/systemui/keyguard/data/repository/KeyguardClockRepository.kt b/packages/SystemUI/src/com/android/systemui/keyguard/data/repository/KeyguardClockRepository.kt index 95d1b5d7fcac..283651dd9db7 100644 --- a/packages/SystemUI/src/com/android/systemui/keyguard/data/repository/KeyguardClockRepository.kt +++ b/packages/SystemUI/src/com/android/systemui/keyguard/data/repository/KeyguardClockRepository.kt @@ -31,6 +31,7 @@ import com.android.systemui.plugins.clocks.ClockController import com.android.systemui.plugins.clocks.ClockId import com.android.systemui.res.R import com.android.systemui.scene.shared.flag.SceneContainerFlag +import com.android.systemui.shade.ShadeDisplayAware import com.android.systemui.shared.clocks.ClockRegistry import com.android.systemui.util.settings.SecureSettings import com.android.systemui.util.settings.SettingsProxyExt.observerFlow @@ -89,7 +90,7 @@ constructor( override val clockEventController: ClockEventController, @Background private val backgroundDispatcher: CoroutineDispatcher, @Application private val applicationScope: CoroutineScope, - @Application private val applicationContext: Context, + @ShadeDisplayAware private val context: Context, private val featureFlags: FeatureFlagsClassic, ) : KeyguardClockRepository { @@ -166,7 +167,7 @@ constructor( get() = featureFlags.isEnabled(Flags.LOCKSCREEN_ENABLE_LANDSCAPE) && // True on small landscape screens - applicationContext.resources.getBoolean(R.bool.force_small_clock_on_lockscreen) + context.resources.getBoolean(R.bool.force_small_clock_on_lockscreen) private fun getClockSize(): ClockSizeSetting { return ClockSizeSetting.fromSettingValue( diff --git a/packages/SystemUI/src/com/android/systemui/keyguard/data/repository/KeyguardQuickAffordanceRepository.kt b/packages/SystemUI/src/com/android/systemui/keyguard/data/repository/KeyguardQuickAffordanceRepository.kt index d0de21b45be0..c1ec88bb44f1 100644 --- a/packages/SystemUI/src/com/android/systemui/keyguard/data/repository/KeyguardQuickAffordanceRepository.kt +++ b/packages/SystemUI/src/com/android/systemui/keyguard/data/repository/KeyguardQuickAffordanceRepository.kt @@ -36,6 +36,7 @@ import com.android.systemui.keyguard.shared.model.KeyguardQuickAffordancePickerR import com.android.systemui.keyguard.shared.model.KeyguardSlotPickerRepresentation import com.android.systemui.res.R import com.android.systemui.settings.UserTracker +import com.android.systemui.shade.ShadeDisplayAware import com.android.systemui.util.kotlin.FlowDumperImpl import java.io.PrintWriter import javax.inject.Inject @@ -57,7 +58,7 @@ import kotlinx.coroutines.flow.stateIn class KeyguardQuickAffordanceRepository @Inject constructor( - @Application private val appContext: Context, + @ShadeDisplayAware private val appContext: Context, @Application private val scope: CoroutineScope, private val localUserSelectionManager: KeyguardQuickAffordanceLocalUserSelectionManager, private val remoteUserSelectionManager: KeyguardQuickAffordanceRemoteUserSelectionManager, diff --git a/packages/SystemUI/src/com/android/systemui/keyguard/data/repository/KeyguardSmartspaceRepository.kt b/packages/SystemUI/src/com/android/systemui/keyguard/data/repository/KeyguardSmartspaceRepository.kt index b67fd4bf0ea7..549a5081cc43 100644 --- a/packages/SystemUI/src/com/android/systemui/keyguard/data/repository/KeyguardSmartspaceRepository.kt +++ b/packages/SystemUI/src/com/android/systemui/keyguard/data/repository/KeyguardSmartspaceRepository.kt @@ -16,7 +16,6 @@ package com.android.systemui.keyguard.data.repository -import android.content.Context import android.os.UserHandle import android.provider.Settings import android.view.View @@ -46,7 +45,6 @@ interface KeyguardSmartspaceRepository { class KeyguardSmartspaceRepositoryImpl @Inject constructor( - context: Context, private val secureSettings: SecureSettings, private val userTracker: UserTracker, @Application private val applicationScope: CoroutineScope, diff --git a/packages/SystemUI/src/com/android/systemui/keyguard/data/repository/LightRevealScrimRepository.kt b/packages/SystemUI/src/com/android/systemui/keyguard/data/repository/LightRevealScrimRepository.kt index 4c9c282514cd..4f6319af24f1 100644 --- a/packages/SystemUI/src/com/android/systemui/keyguard/data/repository/LightRevealScrimRepository.kt +++ b/packages/SystemUI/src/com/android/systemui/keyguard/data/repository/LightRevealScrimRepository.kt @@ -30,6 +30,7 @@ import com.android.systemui.power.data.repository.PowerRepository import com.android.systemui.power.shared.model.WakeSleepReason import com.android.systemui.power.shared.model.WakeSleepReason.TAP import com.android.systemui.res.R +import com.android.systemui.shade.ShadeDisplayAware import com.android.systemui.statusbar.CircleReveal import com.android.systemui.statusbar.LiftReveal import com.android.systemui.statusbar.LightRevealEffect @@ -77,7 +78,7 @@ class LightRevealScrimRepositoryImpl @Inject constructor( keyguardRepository: KeyguardRepository, - val context: Context, + @ShadeDisplayAware val context: Context, powerRepository: PowerRepository, private val scrimLogger: ScrimLogger, ) : LightRevealScrimRepository { diff --git a/packages/SystemUI/src/com/android/systemui/keyguard/domain/interactor/BurnInInteractor.kt b/packages/SystemUI/src/com/android/systemui/keyguard/domain/interactor/BurnInInteractor.kt index 73a4cc3ad9df..68ec4f3e86ce 100644 --- a/packages/SystemUI/src/com/android/systemui/keyguard/domain/interactor/BurnInInteractor.kt +++ b/packages/SystemUI/src/com/android/systemui/keyguard/domain/interactor/BurnInInteractor.kt @@ -45,7 +45,7 @@ import kotlinx.coroutines.flow.stateIn class BurnInInteractor @Inject constructor( - private val context: Context, + @ShadeDisplayAware private val context: Context, private val burnInHelperWrapper: BurnInHelperWrapper, @Application private val scope: CoroutineScope, @ShadeDisplayAware private val configurationInteractor: ConfigurationInteractor, diff --git a/packages/SystemUI/src/com/android/systemui/keyguard/domain/interactor/DeviceEntrySideFpsOverlayInteractor.kt b/packages/SystemUI/src/com/android/systemui/keyguard/domain/interactor/DeviceEntrySideFpsOverlayInteractor.kt index 03cf1a4b3e9a..6367b5c2df8e 100644 --- a/packages/SystemUI/src/com/android/systemui/keyguard/domain/interactor/DeviceEntrySideFpsOverlayInteractor.kt +++ b/packages/SystemUI/src/com/android/systemui/keyguard/domain/interactor/DeviceEntrySideFpsOverlayInteractor.kt @@ -28,6 +28,7 @@ import com.android.systemui.res.R import com.android.systemui.scene.domain.interactor.SceneInteractor import com.android.systemui.scene.shared.flag.SceneContainerFlag import com.android.systemui.scene.shared.model.Scenes +import com.android.systemui.shade.ShadeDisplayAware import javax.inject.Inject import kotlinx.coroutines.flow.Flow import kotlinx.coroutines.flow.combine @@ -47,7 +48,7 @@ import kotlinx.coroutines.flow.onEach class DeviceEntrySideFpsOverlayInteractor @Inject constructor( - @Application private val context: Context, + @ShadeDisplayAware private val context: Context, deviceEntryFingerprintAuthRepository: DeviceEntryFingerprintAuthRepository, private val sceneInteractor: SceneInteractor, private val primaryBouncerInteractor: PrimaryBouncerInteractor, diff --git a/packages/SystemUI/src/com/android/systemui/keyguard/domain/interactor/KeyguardKeyEventInteractor.kt b/packages/SystemUI/src/com/android/systemui/keyguard/domain/interactor/KeyguardKeyEventInteractor.kt index d4d7e75a8b41..2d81be6fb0dc 100644 --- a/packages/SystemUI/src/com/android/systemui/keyguard/domain/interactor/KeyguardKeyEventInteractor.kt +++ b/packages/SystemUI/src/com/android/systemui/keyguard/domain/interactor/KeyguardKeyEventInteractor.kt @@ -28,6 +28,7 @@ import com.android.systemui.plugins.ActivityStarter.OnDismissAction import com.android.systemui.plugins.statusbar.StatusBarStateController import com.android.systemui.power.domain.interactor.PowerInteractor import com.android.systemui.shade.ShadeController +import com.android.systemui.shade.ShadeDisplayAware import com.android.systemui.statusbar.StatusBarState import com.android.systemui.statusbar.phone.StatusBarKeyguardViewManager import javax.inject.Inject @@ -39,7 +40,7 @@ import kotlinx.coroutines.ExperimentalCoroutinesApi class KeyguardKeyEventInteractor @Inject constructor( - private val context: Context, + @ShadeDisplayAware private val context: Context, private val statusBarStateController: StatusBarStateController, private val statusBarKeyguardViewManager: StatusBarKeyguardViewManager, private val shadeController: ShadeController, diff --git a/packages/SystemUI/src/com/android/systemui/keyguard/domain/interactor/KeyguardQuickAffordanceInteractor.kt b/packages/SystemUI/src/com/android/systemui/keyguard/domain/interactor/KeyguardQuickAffordanceInteractor.kt index 8c9473f4284b..ae55825c9842 100644 --- a/packages/SystemUI/src/com/android/systemui/keyguard/domain/interactor/KeyguardQuickAffordanceInteractor.kt +++ b/packages/SystemUI/src/com/android/systemui/keyguard/domain/interactor/KeyguardQuickAffordanceInteractor.kt @@ -51,6 +51,7 @@ import com.android.systemui.scene.domain.interactor.SceneInteractor import com.android.systemui.scene.shared.flag.SceneContainerFlag import com.android.systemui.scene.shared.model.Scenes import com.android.systemui.settings.UserTracker +import com.android.systemui.shade.ShadeDisplayAware import com.android.systemui.shade.domain.interactor.ShadeInteractor import com.android.systemui.shared.customization.data.content.CustomizationProviderContract as Contract import com.android.systemui.shared.quickaffordance.shared.model.KeyguardPreviewConstants.KEYGUARD_QUICK_AFFORDANCE_ID_NONE @@ -90,7 +91,7 @@ constructor( private val dockManager: DockManager, private val biometricSettingsRepository: BiometricSettingsRepository, @Background private val backgroundDispatcher: CoroutineDispatcher, - @Application private val appContext: Context, + @ShadeDisplayAware private val appContext: Context, private val sceneInteractor: Lazy<SceneInteractor>, ) { /** diff --git a/packages/SystemUI/src/com/android/systemui/keyguard/domain/interactor/KeyguardSurfaceBehindInteractor.kt b/packages/SystemUI/src/com/android/systemui/keyguard/domain/interactor/KeyguardSurfaceBehindInteractor.kt index 377a03edf88d..b9784f14fa1c 100644 --- a/packages/SystemUI/src/com/android/systemui/keyguard/domain/interactor/KeyguardSurfaceBehindInteractor.kt +++ b/packages/SystemUI/src/com/android/systemui/keyguard/domain/interactor/KeyguardSurfaceBehindInteractor.kt @@ -23,6 +23,7 @@ import com.android.systemui.keyguard.shared.model.Edge import com.android.systemui.keyguard.shared.model.KeyguardState import com.android.systemui.keyguard.shared.model.KeyguardSurfaceBehindModel import com.android.systemui.scene.shared.model.Scenes +import com.android.systemui.shade.ShadeDisplayAware import com.android.systemui.statusbar.notification.domain.interactor.NotificationLaunchAnimationInteractor import com.android.systemui.util.kotlin.sample import com.android.systemui.util.kotlin.toPx @@ -45,7 +46,7 @@ class KeyguardSurfaceBehindInteractor @Inject constructor( private val repository: KeyguardSurfaceBehindRepository, - context: Context, + @ShadeDisplayAware context: Context, transitionInteractor: KeyguardTransitionInteractor, inWindowLauncherUnlockAnimationInteractor: Lazy<InWindowLauncherUnlockAnimationInteractor>, swipeToDismissInteractor: SwipeToDismissInteractor, diff --git a/packages/SystemUI/src/com/android/systemui/keyguard/domain/interactor/KeyguardTouchHandlingInteractor.kt b/packages/SystemUI/src/com/android/systemui/keyguard/domain/interactor/KeyguardTouchHandlingInteractor.kt index b2031d300a82..274a1ddbd392 100644 --- a/packages/SystemUI/src/com/android/systemui/keyguard/domain/interactor/KeyguardTouchHandlingInteractor.kt +++ b/packages/SystemUI/src/com/android/systemui/keyguard/domain/interactor/KeyguardTouchHandlingInteractor.kt @@ -34,6 +34,7 @@ import com.android.systemui.keyguard.data.repository.KeyguardRepository import com.android.systemui.keyguard.shared.model.KeyguardState import com.android.systemui.res.R import com.android.systemui.shade.PulsingGestureListener +import com.android.systemui.shade.ShadeDisplayAware import com.android.systemui.statusbar.policy.AccessibilityManagerWrapper import javax.inject.Inject import kotlinx.coroutines.CoroutineScope @@ -58,7 +59,7 @@ import com.android.app.tracing.coroutines.launchTraced as launch class KeyguardTouchHandlingInteractor @Inject constructor( - @Application private val appContext: Context, + @ShadeDisplayAware private val context: Context, @Application private val scope: CoroutineScope, transitionInteractor: KeyguardTransitionInteractor, repository: KeyguardRepository, @@ -188,7 +189,7 @@ constructor( private fun isFeatureEnabled(): Boolean { return featureFlags.isEnabled(Flags.LOCK_SCREEN_LONG_PRESS_ENABLED) && - appContext.resources.getBoolean(R.bool.long_press_keyguard_customize_lockscreen_enabled) + context.resources.getBoolean(R.bool.long_press_keyguard_customize_lockscreen_enabled) } /** Updates application state to ask to show the menu. */ diff --git a/packages/SystemUI/src/com/android/systemui/keyguard/domain/interactor/KeyguardWakeDirectlyToGoneInteractor.kt b/packages/SystemUI/src/com/android/systemui/keyguard/domain/interactor/KeyguardWakeDirectlyToGoneInteractor.kt index 9c98a96ea908..fbc7e2aecbdf 100644 --- a/packages/SystemUI/src/com/android/systemui/keyguard/domain/interactor/KeyguardWakeDirectlyToGoneInteractor.kt +++ b/packages/SystemUI/src/com/android/systemui/keyguard/domain/interactor/KeyguardWakeDirectlyToGoneInteractor.kt @@ -38,6 +38,7 @@ import com.android.systemui.keyguard.shared.model.KeyguardState.Companion.device import com.android.systemui.power.domain.interactor.PowerInteractor import com.android.systemui.power.shared.model.WakeSleepReason import com.android.systemui.scene.shared.model.Scenes +import com.android.systemui.shade.ShadeDisplayAware import com.android.systemui.user.domain.interactor.SelectedUserInteractor import com.android.systemui.util.kotlin.sample import com.android.systemui.util.settings.SecureSettings @@ -75,7 +76,7 @@ class KeyguardWakeDirectlyToGoneInteractor @Inject constructor( @Application private val scope: CoroutineScope, - private val context: Context, + @ShadeDisplayAware private val context: Context, private val repository: KeyguardRepository, private val systemClock: SystemClock, private val alarmManager: AlarmManager, diff --git a/packages/SystemUI/src/com/android/systemui/keyguard/domain/interactor/NaturalScrollingSettingObserver.kt b/packages/SystemUI/src/com/android/systemui/keyguard/domain/interactor/NaturalScrollingSettingObserver.kt index 508fb597ef65..7e7742354a9c 100644 --- a/packages/SystemUI/src/com/android/systemui/keyguard/domain/interactor/NaturalScrollingSettingObserver.kt +++ b/packages/SystemUI/src/com/android/systemui/keyguard/domain/interactor/NaturalScrollingSettingObserver.kt @@ -24,6 +24,7 @@ import android.provider.Settings import android.provider.Settings.SettingNotFoundException import com.android.systemui.dagger.SysUISingleton import com.android.systemui.dagger.qualifiers.Main +import com.android.systemui.shade.ShadeDisplayAware import javax.inject.Inject @SysUISingleton @@ -31,7 +32,7 @@ class NaturalScrollingSettingObserver @Inject constructor( @Main private val handler: Handler, - private val context: Context, + @ShadeDisplayAware private val context: Context, ) { var isNaturalScrollingEnabled = true get() { diff --git a/packages/SystemUI/src/com/android/systemui/keyguard/domain/interactor/StatusBarDisableFlagsInteractor.kt b/packages/SystemUI/src/com/android/systemui/keyguard/domain/interactor/StatusBarDisableFlagsInteractor.kt index 73e80ff1d02b..d6a110a8fd55 100644 --- a/packages/SystemUI/src/com/android/systemui/keyguard/domain/interactor/StatusBarDisableFlagsInteractor.kt +++ b/packages/SystemUI/src/com/android/systemui/keyguard/domain/interactor/StatusBarDisableFlagsInteractor.kt @@ -40,6 +40,7 @@ import com.android.systemui.power.domain.interactor.PowerInteractor import com.android.systemui.power.shared.model.WakeSleepReason import com.android.systemui.power.shared.model.WakefulnessModel import com.android.systemui.scene.shared.flag.SceneContainerFlag +import com.android.systemui.shade.ShadeDisplayAware import com.android.systemui.user.domain.interactor.SelectedUserInteractor import javax.inject.Inject import kotlinx.coroutines.CoroutineDispatcher @@ -62,7 +63,7 @@ class StatusBarDisableFlagsInteractor @Inject constructor( @Application private val scope: CoroutineScope, - @Application private val applicationContext: Context, + @ShadeDisplayAware private val context: Context, @Background private val backgroundDispatcher: CoroutineDispatcher, private val deviceEntryFaceAuthInteractor: DeviceEntryFaceAuthInteractor, private val statusBarService: IStatusBarService, @@ -142,7 +143,7 @@ constructor( scope.launch { disableFlagsForUserId.collect { (selectedUserId, flags) -> - if (applicationContext.getSystemService(Context.STATUS_BAR_SERVICE) == null) { + if (context.getSystemService(Context.STATUS_BAR_SERVICE) == null) { return@collect } @@ -151,7 +152,7 @@ constructor( statusBarService.disableForUser( flags, disableToken, - applicationContext.packageName, + context.packageName, selectedUserId, ) } catch (e: RemoteException) { diff --git a/packages/SystemUI/src/com/android/systemui/keyguard/ui/SwipeUpAnywhereGestureHandler.kt b/packages/SystemUI/src/com/android/systemui/keyguard/ui/SwipeUpAnywhereGestureHandler.kt index 3540a0c6f016..b6aa209fad3f 100644 --- a/packages/SystemUI/src/com/android/systemui/keyguard/ui/SwipeUpAnywhereGestureHandler.kt +++ b/packages/SystemUI/src/com/android/systemui/keyguard/ui/SwipeUpAnywhereGestureHandler.kt @@ -20,6 +20,7 @@ import android.content.Context import android.view.MotionEvent import com.android.systemui.dagger.SysUISingleton import com.android.systemui.settings.DisplayTracker +import com.android.systemui.shade.ShadeDisplayAware import com.android.systemui.statusbar.gesture.SwipeUpGestureHandler import com.android.systemui.statusbar.gesture.SwipeUpGestureLogger import javax.inject.Inject @@ -29,7 +30,7 @@ import javax.inject.Inject class SwipeUpAnywhereGestureHandler @Inject constructor( - context: Context, + @ShadeDisplayAware context: Context, displayTracker: DisplayTracker, logger: SwipeUpGestureLogger, ) : diff --git a/packages/SystemUI/src/com/android/systemui/keyguard/ui/view/layout/sections/AccessibilityActionsSection.kt b/packages/SystemUI/src/com/android/systemui/keyguard/ui/view/layout/sections/AccessibilityActionsSection.kt index 717a89801ba4..587a8fe5a5c3 100644 --- a/packages/SystemUI/src/com/android/systemui/keyguard/ui/view/layout/sections/AccessibilityActionsSection.kt +++ b/packages/SystemUI/src/com/android/systemui/keyguard/ui/view/layout/sections/AccessibilityActionsSection.kt @@ -26,6 +26,7 @@ import com.android.systemui.keyguard.shared.model.KeyguardSection import com.android.systemui.keyguard.ui.binder.AccessibilityActionsViewBinder import com.android.systemui.keyguard.ui.viewmodel.AccessibilityActionsViewModel import com.android.systemui.res.R +import com.android.systemui.shade.ShadeDisplayAware import com.android.systemui.util.Utils import javax.inject.Inject import kotlinx.coroutines.DisposableHandle @@ -37,7 +38,7 @@ import kotlinx.coroutines.DisposableHandle class AccessibilityActionsSection @Inject constructor( - private val context: Context, + @ShadeDisplayAware private val context: Context, private val communalSettingsInteractor: CommunalSettingsInteractor, private val accessibilityActionsViewModel: AccessibilityActionsViewModel, ) : KeyguardSection() { diff --git a/packages/SystemUI/src/com/android/systemui/keyguard/ui/view/layout/sections/AodBurnInSection.kt b/packages/SystemUI/src/com/android/systemui/keyguard/ui/view/layout/sections/AodBurnInSection.kt index d639978764f8..8622ffc04601 100644 --- a/packages/SystemUI/src/com/android/systemui/keyguard/ui/view/layout/sections/AodBurnInSection.kt +++ b/packages/SystemUI/src/com/android/systemui/keyguard/ui/view/layout/sections/AodBurnInSection.kt @@ -28,13 +28,14 @@ import com.android.systemui.keyguard.shared.model.KeyguardSection import com.android.systemui.keyguard.ui.view.KeyguardRootView import com.android.systemui.keyguard.ui.viewmodel.KeyguardClockViewModel import com.android.systemui.res.R +import com.android.systemui.shade.ShadeDisplayAware import javax.inject.Inject /** Adds a layer to group elements for translation for burn-in preventation */ class AodBurnInSection @Inject constructor( - private val context: Context, + @ShadeDisplayAware private val context: Context, private val rootView: KeyguardRootView, private val clockViewModel: KeyguardClockViewModel, ) : KeyguardSection() { diff --git a/packages/SystemUI/src/com/android/systemui/keyguard/ui/view/layout/sections/AodNotificationIconsSection.kt b/packages/SystemUI/src/com/android/systemui/keyguard/ui/view/layout/sections/AodNotificationIconsSection.kt index faa497833e7b..08c3f153bc4e 100644 --- a/packages/SystemUI/src/com/android/systemui/keyguard/ui/view/layout/sections/AodNotificationIconsSection.kt +++ b/packages/SystemUI/src/com/android/systemui/keyguard/ui/view/layout/sections/AodNotificationIconsSection.kt @@ -47,7 +47,7 @@ import kotlinx.coroutines.DisposableHandle class AodNotificationIconsSection @Inject constructor( - private val context: Context, + @ShadeDisplayAware private val context: Context, @ShadeDisplayAware private val configurationState: ConfigurationState, private val iconBindingFailureTracker: StatusBarIconViewBindingFailureTracker, private val nicAodViewModel: NotificationIconContainerAlwaysOnDisplayViewModel, diff --git a/packages/SystemUI/src/com/android/systemui/keyguard/ui/view/layout/sections/ClockSection.kt b/packages/SystemUI/src/com/android/systemui/keyguard/ui/view/layout/sections/ClockSection.kt index 6096cf74a772..c009720feaeb 100644 --- a/packages/SystemUI/src/com/android/systemui/keyguard/ui/view/layout/sections/ClockSection.kt +++ b/packages/SystemUI/src/com/android/systemui/keyguard/ui/view/layout/sections/ClockSection.kt @@ -45,6 +45,7 @@ import com.android.systemui.plugins.clocks.ClockController import com.android.systemui.plugins.clocks.ClockFaceLayout import com.android.systemui.res.R import com.android.systemui.shade.LargeScreenHeaderHelper +import com.android.systemui.shade.ShadeDisplayAware import com.android.systemui.shared.R as sharedR import com.android.systemui.util.ui.value import dagger.Lazy @@ -69,7 +70,7 @@ class ClockSection constructor( private val clockInteractor: KeyguardClockInteractor, protected val keyguardClockViewModel: KeyguardClockViewModel, - private val context: Context, + @ShadeDisplayAware private val context: Context, val smartspaceViewModel: KeyguardSmartspaceViewModel, val blueprintInteractor: Lazy<KeyguardBlueprintInteractor>, private val rootViewModel: KeyguardRootViewModel, diff --git a/packages/SystemUI/src/com/android/systemui/keyguard/ui/view/layout/sections/DefaultDeviceEntrySection.kt b/packages/SystemUI/src/com/android/systemui/keyguard/ui/view/layout/sections/DefaultDeviceEntrySection.kt index 8d2bfb5bdf40..b51bb7b229ee 100644 --- a/packages/SystemUI/src/com/android/systemui/keyguard/ui/view/layout/sections/DefaultDeviceEntrySection.kt +++ b/packages/SystemUI/src/com/android/systemui/keyguard/ui/view/layout/sections/DefaultDeviceEntrySection.kt @@ -45,6 +45,7 @@ import com.android.systemui.log.dagger.LongPressTouchLog import com.android.systemui.plugins.FalsingManager import com.android.systemui.res.R import com.android.systemui.shade.NotificationPanelView +import com.android.systemui.shade.ShadeDisplayAware import com.android.systemui.statusbar.VibratorHelper import dagger.Lazy import javax.inject.Inject @@ -60,7 +61,7 @@ constructor( @Application private val applicationScope: CoroutineScope, private val authController: AuthController, private val windowManager: WindowManager, - private val context: Context, + @ShadeDisplayAware private val context: Context, private val notificationPanelView: NotificationPanelView, private val featureFlags: FeatureFlags, private val deviceEntryIconViewModel: Lazy<DeviceEntryIconViewModel>, diff --git a/packages/SystemUI/src/com/android/systemui/keyguard/ui/view/layout/sections/DefaultIndicationAreaSection.kt b/packages/SystemUI/src/com/android/systemui/keyguard/ui/view/layout/sections/DefaultIndicationAreaSection.kt index af0528a4c354..2d9dac41ba6e 100644 --- a/packages/SystemUI/src/com/android/systemui/keyguard/ui/view/layout/sections/DefaultIndicationAreaSection.kt +++ b/packages/SystemUI/src/com/android/systemui/keyguard/ui/view/layout/sections/DefaultIndicationAreaSection.kt @@ -27,6 +27,7 @@ import com.android.systemui.keyguard.ui.binder.KeyguardIndicationAreaBinder import com.android.systemui.keyguard.ui.view.KeyguardIndicationArea import com.android.systemui.keyguard.ui.viewmodel.KeyguardIndicationAreaViewModel import com.android.systemui.res.R +import com.android.systemui.shade.ShadeDisplayAware import com.android.systemui.statusbar.KeyguardIndicationController import javax.inject.Inject import kotlinx.coroutines.DisposableHandle @@ -34,7 +35,7 @@ import kotlinx.coroutines.DisposableHandle class DefaultIndicationAreaSection @Inject constructor( - private val context: Context, + @ShadeDisplayAware private val context: Context, private val keyguardIndicationAreaViewModel: KeyguardIndicationAreaViewModel, private val indicationController: KeyguardIndicationController, ) : KeyguardSection() { diff --git a/packages/SystemUI/src/com/android/systemui/keyguard/ui/view/layout/sections/DefaultNotificationStackScrollLayoutSection.kt b/packages/SystemUI/src/com/android/systemui/keyguard/ui/view/layout/sections/DefaultNotificationStackScrollLayoutSection.kt index 6ac33af26605..3a791fd45528 100644 --- a/packages/SystemUI/src/com/android/systemui/keyguard/ui/view/layout/sections/DefaultNotificationStackScrollLayoutSection.kt +++ b/packages/SystemUI/src/com/android/systemui/keyguard/ui/view/layout/sections/DefaultNotificationStackScrollLayoutSection.kt @@ -28,6 +28,7 @@ import com.android.systemui.keyguard.MigrateClocksToBlueprint import com.android.systemui.res.R import com.android.systemui.shade.LargeScreenHeaderHelper import com.android.systemui.shade.NotificationPanelView +import com.android.systemui.shade.ShadeDisplayAware import com.android.systemui.statusbar.notification.stack.ui.view.SharedNotificationContainer import com.android.systemui.statusbar.notification.stack.ui.viewbinder.SharedNotificationContainerBinder import com.android.systemui.statusbar.notification.stack.ui.viewmodel.SharedNotificationContainerViewModel @@ -38,7 +39,7 @@ import javax.inject.Inject class DefaultNotificationStackScrollLayoutSection @Inject constructor( - context: Context, + @ShadeDisplayAware context: Context, notificationPanelView: NotificationPanelView, sharedNotificationContainer: SharedNotificationContainer, sharedNotificationContainerViewModel: SharedNotificationContainerViewModel, diff --git a/packages/SystemUI/src/com/android/systemui/keyguard/ui/view/layout/sections/DefaultStatusBarSection.kt b/packages/SystemUI/src/com/android/systemui/keyguard/ui/view/layout/sections/DefaultStatusBarSection.kt index 9b5fae38059e..9d9be44f3153 100644 --- a/packages/SystemUI/src/com/android/systemui/keyguard/ui/view/layout/sections/DefaultStatusBarSection.kt +++ b/packages/SystemUI/src/com/android/systemui/keyguard/ui/view/layout/sections/DefaultStatusBarSection.kt @@ -31,6 +31,7 @@ import com.android.systemui.keyguard.shared.model.KeyguardSection import com.android.systemui.res.R import com.android.systemui.scene.shared.flag.SceneContainerFlag import com.android.systemui.shade.NotificationPanelView +import com.android.systemui.shade.ShadeDisplayAware import com.android.systemui.shade.ShadeViewStateProvider import com.android.systemui.statusbar.phone.KeyguardStatusBarView import com.android.systemui.util.Utils @@ -40,7 +41,7 @@ import javax.inject.Inject class DefaultStatusBarSection @Inject constructor( - private val context: Context, + @ShadeDisplayAware private val context: Context, private val notificationPanelView: NotificationPanelView, private val keyguardStatusBarViewComponentFactory: KeyguardStatusBarViewComponent.Factory, ) : KeyguardSection() { diff --git a/packages/SystemUI/src/com/android/systemui/keyguard/ui/view/layout/sections/DefaultStatusViewSection.kt b/packages/SystemUI/src/com/android/systemui/keyguard/ui/view/layout/sections/DefaultStatusViewSection.kt index 45641dbfc517..57ea1ad5575d 100644 --- a/packages/SystemUI/src/com/android/systemui/keyguard/ui/view/layout/sections/DefaultStatusViewSection.kt +++ b/packages/SystemUI/src/com/android/systemui/keyguard/ui/view/layout/sections/DefaultStatusViewSection.kt @@ -38,6 +38,7 @@ import com.android.systemui.media.controls.ui.controller.KeyguardMediaController import com.android.systemui.res.R import com.android.systemui.shade.NotificationPanelView import com.android.systemui.shade.NotificationPanelViewController +import com.android.systemui.shade.ShadeDisplayAware import com.android.systemui.statusbar.policy.SplitShadeStateController import com.android.systemui.util.Utils import dagger.Lazy @@ -47,7 +48,7 @@ import kotlinx.coroutines.ExperimentalCoroutinesApi class DefaultStatusViewSection @Inject constructor( - private val context: Context, + @ShadeDisplayAware private val context: Context, private val notificationPanelView: NotificationPanelView, private val keyguardStatusViewComponentFactory: KeyguardStatusViewComponent.Factory, private val keyguardViewConfigurator: Lazy<KeyguardViewConfigurator>, diff --git a/packages/SystemUI/src/com/android/systemui/keyguard/ui/view/layout/sections/DefaultUdfpsAccessibilityOverlaySection.kt b/packages/SystemUI/src/com/android/systemui/keyguard/ui/view/layout/sections/DefaultUdfpsAccessibilityOverlaySection.kt index 2abb7ba37340..0ae1400b1906 100644 --- a/packages/SystemUI/src/com/android/systemui/keyguard/ui/view/layout/sections/DefaultUdfpsAccessibilityOverlaySection.kt +++ b/packages/SystemUI/src/com/android/systemui/keyguard/ui/view/layout/sections/DefaultUdfpsAccessibilityOverlaySection.kt @@ -26,6 +26,7 @@ import com.android.systemui.deviceentry.ui.viewmodel.DeviceEntryUdfpsAccessibili import com.android.systemui.keyguard.KeyguardBottomAreaRefactor import com.android.systemui.keyguard.shared.model.KeyguardSection import com.android.systemui.res.R +import com.android.systemui.shade.ShadeDisplayAware import javax.inject.Inject import kotlinx.coroutines.ExperimentalCoroutinesApi @@ -34,7 +35,7 @@ import kotlinx.coroutines.ExperimentalCoroutinesApi class DefaultUdfpsAccessibilityOverlaySection @Inject constructor( - private val context: Context, + @ShadeDisplayAware private val context: Context, private val viewModel: DeviceEntryUdfpsAccessibilityOverlayViewModel, ) : KeyguardSection() { private val viewId = R.id.udfps_accessibility_overlay diff --git a/packages/SystemUI/src/com/android/systemui/keyguard/ui/view/layout/sections/SmartspaceSection.kt b/packages/SystemUI/src/com/android/systemui/keyguard/ui/view/layout/sections/SmartspaceSection.kt index 6ddcae38ce92..7ad2ec5e3bf8 100644 --- a/packages/SystemUI/src/com/android/systemui/keyguard/ui/view/layout/sections/SmartspaceSection.kt +++ b/packages/SystemUI/src/com/android/systemui/keyguard/ui/view/layout/sections/SmartspaceSection.kt @@ -33,6 +33,7 @@ import com.android.systemui.keyguard.shared.model.KeyguardSection import com.android.systemui.keyguard.ui.binder.KeyguardSmartspaceViewBinder import com.android.systemui.keyguard.ui.viewmodel.KeyguardClockViewModel import com.android.systemui.keyguard.ui.viewmodel.KeyguardSmartspaceViewModel +import com.android.systemui.shade.ShadeDisplayAware import com.android.systemui.res.R as R import com.android.systemui.shared.R as sharedR import com.android.systemui.statusbar.lockscreen.LockscreenSmartspaceController @@ -44,7 +45,7 @@ import kotlinx.coroutines.DisposableHandle open class SmartspaceSection @Inject constructor( - val context: Context, + @ShadeDisplayAware val context: Context, val keyguardClockViewModel: KeyguardClockViewModel, val keyguardSmartspaceViewModel: KeyguardSmartspaceViewModel, private val keyguardSmartspaceInteractor: KeyguardSmartspaceInteractor, diff --git a/packages/SystemUI/src/com/android/systemui/keyguard/ui/view/layout/sections/SplitShadeMediaSection.kt b/packages/SystemUI/src/com/android/systemui/keyguard/ui/view/layout/sections/SplitShadeMediaSection.kt index 5dbba75411a5..0782846f52ae 100644 --- a/packages/SystemUI/src/com/android/systemui/keyguard/ui/view/layout/sections/SplitShadeMediaSection.kt +++ b/packages/SystemUI/src/com/android/systemui/keyguard/ui/view/layout/sections/SplitShadeMediaSection.kt @@ -33,13 +33,14 @@ import com.android.systemui.keyguard.shared.model.KeyguardSection import com.android.systemui.media.controls.ui.controller.KeyguardMediaController import com.android.systemui.res.R import com.android.systemui.shade.NotificationPanelView +import com.android.systemui.shade.ShadeDisplayAware import javax.inject.Inject /** Aligns media on left side for split shade, below smartspace, date, and weather. */ class SplitShadeMediaSection @Inject constructor( - private val context: Context, + @ShadeDisplayAware private val context: Context, private val notificationPanelView: NotificationPanelView, private val keyguardMediaController: KeyguardMediaController ) : KeyguardSection() { diff --git a/packages/SystemUI/src/com/android/systemui/keyguard/ui/view/layout/sections/SplitShadeNotificationStackScrollLayoutSection.kt b/packages/SystemUI/src/com/android/systemui/keyguard/ui/view/layout/sections/SplitShadeNotificationStackScrollLayoutSection.kt index 1a7386678e14..729759a9ad00 100644 --- a/packages/SystemUI/src/com/android/systemui/keyguard/ui/view/layout/sections/SplitShadeNotificationStackScrollLayoutSection.kt +++ b/packages/SystemUI/src/com/android/systemui/keyguard/ui/view/layout/sections/SplitShadeNotificationStackScrollLayoutSection.kt @@ -26,6 +26,7 @@ import androidx.constraintlayout.widget.ConstraintSet.TOP import com.android.systemui.keyguard.MigrateClocksToBlueprint import com.android.systemui.res.R import com.android.systemui.shade.NotificationPanelView +import com.android.systemui.shade.ShadeDisplayAware import com.android.systemui.statusbar.notification.stack.ui.view.SharedNotificationContainer import com.android.systemui.statusbar.notification.stack.ui.viewbinder.SharedNotificationContainerBinder import com.android.systemui.statusbar.notification.stack.ui.viewmodel.SharedNotificationContainerViewModel @@ -35,7 +36,7 @@ import javax.inject.Inject class SplitShadeNotificationStackScrollLayoutSection @Inject constructor( - context: Context, + @ShadeDisplayAware context: Context, notificationPanelView: NotificationPanelView, sharedNotificationContainer: SharedNotificationContainer, sharedNotificationContainerViewModel: SharedNotificationContainerViewModel, diff --git a/packages/SystemUI/src/com/android/systemui/keyguard/ui/viewmodel/AlternateBouncerUdfpsIconViewModel.kt b/packages/SystemUI/src/com/android/systemui/keyguard/ui/viewmodel/AlternateBouncerUdfpsIconViewModel.kt index 56e3125f7078..3a5263f3df77 100644 --- a/packages/SystemUI/src/com/android/systemui/keyguard/ui/viewmodel/AlternateBouncerUdfpsIconViewModel.kt +++ b/packages/SystemUI/src/com/android/systemui/keyguard/ui/viewmodel/AlternateBouncerUdfpsIconViewModel.kt @@ -41,7 +41,7 @@ import kotlinx.coroutines.flow.onStart class AlternateBouncerUdfpsIconViewModel @Inject constructor( - val context: Context, + @ShadeDisplayAware val context: Context, @ShadeDisplayAware configurationInteractor: ConfigurationInteractor, deviceEntryUdfpsInteractor: DeviceEntryUdfpsInteractor, deviceEntryBackgroundViewModel: DeviceEntryBackgroundViewModel, diff --git a/packages/SystemUI/src/com/android/systemui/keyguard/ui/viewmodel/DeviceEntryBackgroundViewModel.kt b/packages/SystemUI/src/com/android/systemui/keyguard/ui/viewmodel/DeviceEntryBackgroundViewModel.kt index 12f9467c0f96..29ae4b94be6a 100644 --- a/packages/SystemUI/src/com/android/systemui/keyguard/ui/viewmodel/DeviceEntryBackgroundViewModel.kt +++ b/packages/SystemUI/src/com/android/systemui/keyguard/ui/viewmodel/DeviceEntryBackgroundViewModel.kt @@ -40,7 +40,7 @@ import kotlinx.coroutines.flow.onStart class DeviceEntryBackgroundViewModel @Inject constructor( - val context: Context, + @ShadeDisplayAware val context: Context, val deviceEntryIconViewModel: DeviceEntryIconViewModel, keyguardTransitionInteractor: KeyguardTransitionInteractor, @ShadeDisplayAware configurationInteractor: ConfigurationInteractor, diff --git a/packages/SystemUI/src/com/android/systemui/keyguard/ui/viewmodel/DeviceEntryForegroundViewModel.kt b/packages/SystemUI/src/com/android/systemui/keyguard/ui/viewmodel/DeviceEntryForegroundViewModel.kt index 749f19315409..5065fcbbac93 100644 --- a/packages/SystemUI/src/com/android/systemui/keyguard/ui/viewmodel/DeviceEntryForegroundViewModel.kt +++ b/packages/SystemUI/src/com/android/systemui/keyguard/ui/viewmodel/DeviceEntryForegroundViewModel.kt @@ -45,7 +45,7 @@ import kotlinx.coroutines.flow.onStart class DeviceEntryForegroundViewModel @Inject constructor( - val context: Context, + @ShadeDisplayAware val context: Context, @ShadeDisplayAware configurationInteractor: ConfigurationInteractor, deviceEntryUdfpsInteractor: DeviceEntryUdfpsInteractor, transitionInteractor: KeyguardTransitionInteractor, diff --git a/packages/SystemUI/src/com/android/systemui/keyguard/ui/viewmodel/SideFpsProgressBarViewModel.kt b/packages/SystemUI/src/com/android/systemui/keyguard/ui/viewmodel/SideFpsProgressBarViewModel.kt index da96f3fd1f9c..3de1f1e6258e 100644 --- a/packages/SystemUI/src/com/android/systemui/keyguard/ui/viewmodel/SideFpsProgressBarViewModel.kt +++ b/packages/SystemUI/src/com/android/systemui/keyguard/ui/viewmodel/SideFpsProgressBarViewModel.kt @@ -40,6 +40,7 @@ import com.android.systemui.keyguard.shared.model.FingerprintAuthenticationStatu import com.android.systemui.keyguard.shared.model.SuccessFingerprintAuthenticationStatus import com.android.systemui.power.domain.interactor.PowerInteractor import com.android.systemui.res.R +import com.android.systemui.shade.ShadeDisplayAware import com.android.systemui.statusbar.phone.DozeServiceHost import javax.inject.Inject import kotlinx.coroutines.CoroutineDispatcher @@ -66,7 +67,7 @@ import com.android.app.tracing.coroutines.launchTraced as launch class SideFpsProgressBarViewModel @Inject constructor( - private val context: Context, + @ShadeDisplayAware private val context: Context, biometricStatusInteractor: BiometricStatusInteractor, deviceEntryFingerprintAuthInteractor: DeviceEntryFingerprintAuthInteractor, private val sfpsSensorInteractor: SideFpsSensorInteractor, diff --git a/packages/SystemUI/tests/src/com/android/systemui/keyguard/ui/viewmodel/KeyguardBottomAreaViewModelTest.kt b/packages/SystemUI/tests/src/com/android/systemui/keyguard/ui/viewmodel/KeyguardBottomAreaViewModelTest.kt index e1845a17a767..7e85dd5d3236 100644 --- a/packages/SystemUI/tests/src/com/android/systemui/keyguard/ui/viewmodel/KeyguardBottomAreaViewModelTest.kt +++ b/packages/SystemUI/tests/src/com/android/systemui/keyguard/ui/viewmodel/KeyguardBottomAreaViewModelTest.kt @@ -213,7 +213,7 @@ class KeyguardBottomAreaViewModelTest(flags: FlagsParameterization) : SysuiTestC ) val keyguardTouchHandlingInteractor = KeyguardTouchHandlingInteractor( - appContext = mContext, + context = mContext, scope = testScope.backgroundScope, transitionInteractor = kosmos.keyguardTransitionInteractor, repository = repository, diff --git a/packages/SystemUI/tests/utils/src/com/android/systemui/keyguard/domain/interactor/KeyguardLongPressInteractorKosmos.kt b/packages/SystemUI/tests/utils/src/com/android/systemui/keyguard/domain/interactor/KeyguardLongPressInteractorKosmos.kt index 769612c988ba..255a780a84be 100644 --- a/packages/SystemUI/tests/utils/src/com/android/systemui/keyguard/domain/interactor/KeyguardLongPressInteractorKosmos.kt +++ b/packages/SystemUI/tests/utils/src/com/android/systemui/keyguard/domain/interactor/KeyguardLongPressInteractorKosmos.kt @@ -30,7 +30,7 @@ import com.android.systemui.shade.pulsingGestureListener val Kosmos.keyguardTouchHandlingInteractor by Kosmos.Fixture { KeyguardTouchHandlingInteractor( - appContext = applicationContext, + context = applicationContext, scope = applicationCoroutineScope, transitionInteractor = keyguardTransitionInteractor, repository = keyguardRepository, |