Loading packages/SystemUI/res/values/config.xml +3 −0 Original line number Diff line number Diff line Loading @@ -1177,4 +1177,7 @@ <!-- Indicates post recording flow to use flat bottom bar to save vertical space --> <bool name="screen_record_post_recording_flat_bottom_bar">false</bool> <!-- Indicates whether the blurred wallpaper is supported --> <bool name="config_supportBlurredWallpaper">true</bool> </resources> packages/SystemUI/src/com/android/systemui/window/domain/interactor/WindowRootViewBlurInteractor.kt +8 −0 Original line number Diff line number Diff line Loading @@ -16,13 +16,16 @@ package com.android.systemui.window.domain.interactor import android.content.res.Resources import com.android.systemui.Flags import com.android.systemui.communal.domain.interactor.CommunalInteractor import com.android.systemui.dagger.SysUISingleton import com.android.systemui.dagger.qualifiers.Application import com.android.systemui.dagger.qualifiers.Main import com.android.systemui.keyguard.domain.interactor.KeyguardInteractor import com.android.systemui.keyguard.domain.interactor.KeyguardTransitionInteractor import com.android.systemui.keyguard.shared.model.KeyguardState.PRIMARY_BOUNCER import com.android.systemui.res.R import com.android.systemui.window.data.repository.BlurAppliedListener import com.android.systemui.window.data.repository.WindowRootViewBlurRepository import javax.inject.Inject Loading @@ -45,6 +48,7 @@ class WindowRootViewBlurInteractor @Inject constructor( @Application private val applicationScope: CoroutineScope, @Main private val resources: Resources, keyguardInteractor: KeyguardInteractor, keyguardTransitionInteractor: KeyguardTransitionInteractor, private val communalInteractor: CommunalInteractor, Loading Loading @@ -91,6 +95,10 @@ constructor( */ val isBlurCurrentlySupported: StateFlow<Boolean> = repository.isBlurSupported /** Whether the blurred wallpaper is supported. This feature is disabled on desktop. */ val isBlurredWallpaperSupported: Boolean = resources.getBoolean(R.bool.config_supportBlurredWallpaper) /** Radius of blur to be applied on the window root view. */ val blurRadiusRequestedByShade: StateFlow<Float> = repository.blurRequestedByShade.asStateFlow() Loading packages/SystemUI/src/com/android/systemui/window/ui/viewmodel/WindowRootViewModel.kt +6 −2 Original line number Diff line number Diff line Loading @@ -137,8 +137,12 @@ constructor( * Whether this surface is opaque or transparent. This controls whether the alpha channel is * composited with the alpha channels from the surfaces below while rendering. */ val isSurfaceOpaque = if (Flags.notificationShadeBlur()) flowOf(false) else shadeInteractor.isAnyFullyExpanded val isSurfaceOpaque: Flow<Boolean> = if (Flags.notificationShadeBlur() || !blurInteractor.isBlurredWallpaperSupported) { flowOf(false) } else { shadeInteractor.isAnyFullyExpanded } fun onBlurApplied(blurRadius: Int, isOpaque: Boolean) { if (isLoggable) { Loading packages/SystemUI/tests/utils/src/com/android/systemui/window/domain/interactor/WindowRootViewBlurInteractorKosmos.kt +2 −0 Original line number Diff line number Diff line Loading @@ -16,6 +16,7 @@ package com.android.systemui.window.domain.interactor import android.content.res.mainResources import com.android.systemui.communal.domain.interactor.communalInteractor import com.android.systemui.keyguard.domain.interactor.keyguardInteractor import com.android.systemui.keyguard.domain.interactor.keyguardTransitionInteractor Loading @@ -27,6 +28,7 @@ val Kosmos.windowRootViewBlurInteractor by Kosmos.Fixture { WindowRootViewBlurInteractor( repository = windowRootViewBlurRepository, resources = mainResources, keyguardInteractor = keyguardInteractor, keyguardTransitionInteractor = keyguardTransitionInteractor, communalInteractor = communalInteractor, Loading Loading
packages/SystemUI/res/values/config.xml +3 −0 Original line number Diff line number Diff line Loading @@ -1177,4 +1177,7 @@ <!-- Indicates post recording flow to use flat bottom bar to save vertical space --> <bool name="screen_record_post_recording_flat_bottom_bar">false</bool> <!-- Indicates whether the blurred wallpaper is supported --> <bool name="config_supportBlurredWallpaper">true</bool> </resources>
packages/SystemUI/src/com/android/systemui/window/domain/interactor/WindowRootViewBlurInteractor.kt +8 −0 Original line number Diff line number Diff line Loading @@ -16,13 +16,16 @@ package com.android.systemui.window.domain.interactor import android.content.res.Resources import com.android.systemui.Flags import com.android.systemui.communal.domain.interactor.CommunalInteractor import com.android.systemui.dagger.SysUISingleton import com.android.systemui.dagger.qualifiers.Application import com.android.systemui.dagger.qualifiers.Main import com.android.systemui.keyguard.domain.interactor.KeyguardInteractor import com.android.systemui.keyguard.domain.interactor.KeyguardTransitionInteractor import com.android.systemui.keyguard.shared.model.KeyguardState.PRIMARY_BOUNCER import com.android.systemui.res.R import com.android.systemui.window.data.repository.BlurAppliedListener import com.android.systemui.window.data.repository.WindowRootViewBlurRepository import javax.inject.Inject Loading @@ -45,6 +48,7 @@ class WindowRootViewBlurInteractor @Inject constructor( @Application private val applicationScope: CoroutineScope, @Main private val resources: Resources, keyguardInteractor: KeyguardInteractor, keyguardTransitionInteractor: KeyguardTransitionInteractor, private val communalInteractor: CommunalInteractor, Loading Loading @@ -91,6 +95,10 @@ constructor( */ val isBlurCurrentlySupported: StateFlow<Boolean> = repository.isBlurSupported /** Whether the blurred wallpaper is supported. This feature is disabled on desktop. */ val isBlurredWallpaperSupported: Boolean = resources.getBoolean(R.bool.config_supportBlurredWallpaper) /** Radius of blur to be applied on the window root view. */ val blurRadiusRequestedByShade: StateFlow<Float> = repository.blurRequestedByShade.asStateFlow() Loading
packages/SystemUI/src/com/android/systemui/window/ui/viewmodel/WindowRootViewModel.kt +6 −2 Original line number Diff line number Diff line Loading @@ -137,8 +137,12 @@ constructor( * Whether this surface is opaque or transparent. This controls whether the alpha channel is * composited with the alpha channels from the surfaces below while rendering. */ val isSurfaceOpaque = if (Flags.notificationShadeBlur()) flowOf(false) else shadeInteractor.isAnyFullyExpanded val isSurfaceOpaque: Flow<Boolean> = if (Flags.notificationShadeBlur() || !blurInteractor.isBlurredWallpaperSupported) { flowOf(false) } else { shadeInteractor.isAnyFullyExpanded } fun onBlurApplied(blurRadius: Int, isOpaque: Boolean) { if (isLoggable) { Loading
packages/SystemUI/tests/utils/src/com/android/systemui/window/domain/interactor/WindowRootViewBlurInteractorKosmos.kt +2 −0 Original line number Diff line number Diff line Loading @@ -16,6 +16,7 @@ package com.android.systemui.window.domain.interactor import android.content.res.mainResources import com.android.systemui.communal.domain.interactor.communalInteractor import com.android.systemui.keyguard.domain.interactor.keyguardInteractor import com.android.systemui.keyguard.domain.interactor.keyguardTransitionInteractor Loading @@ -27,6 +28,7 @@ val Kosmos.windowRootViewBlurInteractor by Kosmos.Fixture { WindowRootViewBlurInteractor( repository = windowRootViewBlurRepository, resources = mainResources, keyguardInteractor = keyguardInteractor, keyguardTransitionInteractor = keyguardTransitionInteractor, communalInteractor = communalInteractor, Loading