Loading packages/SystemUI/src/com/android/systemui/doze/util/BurnInHelper.kt +2 −3 Original line number Diff line number Diff line Loading @@ -55,9 +55,8 @@ fun getBurnInProgressOffset(): Float { /** Returns a value to scale a view in order to avoid burn in. */ fun getBurnInScale(): Float { val multiplier = if (Flags.clockReactiveSmartspaceLayout()) 0.75f else 0.8f return multiplier + val baseBurninScale = if (Flags.clockReactiveSmartspaceLayout()) 0.75f else 0.8f return baseBurninScale + zigzag( System.currentTimeMillis() / MILLIS_PER_MINUTES, 0.2f, Loading packages/SystemUI/src/com/android/systemui/keyguard/ui/viewmodel/AodBurnInViewModel.kt +2 −6 Original line number Diff line number Diff line Loading @@ -70,6 +70,7 @@ constructor( ) { private val TAG = "AodBurnInViewModel" private val burnInParams = MutableStateFlow(BurnInParameters()) private val maxLargeClockScale = if (Flags.clockReactiveSmartspaceLayout()) 0.9f else 1f fun updateBurnInParams(params: BurnInParameters) { burnInParams.value = Loading Loading @@ -192,19 +193,14 @@ constructor( val burnInY = MathUtils.lerp(0, burnIn.translationY, interpolated).toInt() val translationY = max(params.topInset - params.minViewY, burnInY) val stopScale = if (Flags.clockReactiveSmartspaceLayout()) MAX_LARGE_CLOCK_SCALE else 1f BurnInModel( translationX = MathUtils.lerp(0, burnIn.translationX, interpolated).toInt(), translationY = translationY, scale = MathUtils.lerp(burnIn.scale, stopScale, 1f - interpolated), scale = MathUtils.lerp(burnIn.scale, maxLargeClockScale, 1f - interpolated), scaleClockOnly = useScaleOnly, ) } } companion object { private const val MAX_LARGE_CLOCK_SCALE = 0.9f } } /** UI-sourced parameters to pass into the various methods of [AodBurnInViewModel]. */ Loading Loading
packages/SystemUI/src/com/android/systemui/doze/util/BurnInHelper.kt +2 −3 Original line number Diff line number Diff line Loading @@ -55,9 +55,8 @@ fun getBurnInProgressOffset(): Float { /** Returns a value to scale a view in order to avoid burn in. */ fun getBurnInScale(): Float { val multiplier = if (Flags.clockReactiveSmartspaceLayout()) 0.75f else 0.8f return multiplier + val baseBurninScale = if (Flags.clockReactiveSmartspaceLayout()) 0.75f else 0.8f return baseBurninScale + zigzag( System.currentTimeMillis() / MILLIS_PER_MINUTES, 0.2f, Loading
packages/SystemUI/src/com/android/systemui/keyguard/ui/viewmodel/AodBurnInViewModel.kt +2 −6 Original line number Diff line number Diff line Loading @@ -70,6 +70,7 @@ constructor( ) { private val TAG = "AodBurnInViewModel" private val burnInParams = MutableStateFlow(BurnInParameters()) private val maxLargeClockScale = if (Flags.clockReactiveSmartspaceLayout()) 0.9f else 1f fun updateBurnInParams(params: BurnInParameters) { burnInParams.value = Loading Loading @@ -192,19 +193,14 @@ constructor( val burnInY = MathUtils.lerp(0, burnIn.translationY, interpolated).toInt() val translationY = max(params.topInset - params.minViewY, burnInY) val stopScale = if (Flags.clockReactiveSmartspaceLayout()) MAX_LARGE_CLOCK_SCALE else 1f BurnInModel( translationX = MathUtils.lerp(0, burnIn.translationX, interpolated).toInt(), translationY = translationY, scale = MathUtils.lerp(burnIn.scale, stopScale, 1f - interpolated), scale = MathUtils.lerp(burnIn.scale, maxLargeClockScale, 1f - interpolated), scaleClockOnly = useScaleOnly, ) } } companion object { private const val MAX_LARGE_CLOCK_SCALE = 0.9f } } /** UI-sourced parameters to pass into the various methods of [AodBurnInViewModel]. */ Loading