Loading packages/SystemUI/src/com/android/systemui/doze/util/BurnInHelper.kt +3 −2 Original line number Diff line number Diff line Loading @@ -24,7 +24,6 @@ private const val BURN_IN_PREVENTION_PERIOD_Y = 521f private const val BURN_IN_PREVENTION_PERIOD_X = 83f private const val BURN_IN_PREVENTION_PERIOD_SCALE = 181f private const val BURN_IN_PREVENTION_PERIOD_PROGRESS = 89f private val BASE_BURNIN_SCALE = if (Flags.clockReactiveSmartspaceLayout()) 0.75f else 0.8f /** * Returns the translation offset that should be used to avoid burn in at the current time (in Loading Loading @@ -56,7 +55,9 @@ fun getBurnInProgressOffset(): Float { /** Returns a value to scale a view in order to avoid burn in. */ fun getBurnInScale(): Float { return BASE_BURNIN_SCALE + val multiplier = if (Flags.clockReactiveSmartspaceLayout()) 0.75f else 0.8f return multiplier + zigzag( System.currentTimeMillis() / MILLIS_PER_MINUTES, 0.2f, Loading packages/SystemUI/src/com/android/systemui/keyguard/ui/viewmodel/AodBurnInViewModel.kt +3 −2 Original line number Diff line number Diff line Loading @@ -192,17 +192,18 @@ 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, MAX_LARGE_CLOCK_SCALE, 1f - interpolated), scale = MathUtils.lerp(burnIn.scale, stopScale, 1f - interpolated), scaleClockOnly = useScaleOnly, ) } } companion object { private val MAX_LARGE_CLOCK_SCALE = if (Flags.clockReactiveSmartspaceLayout()) 0.9f else 1f private const val MAX_LARGE_CLOCK_SCALE = 0.9f } } Loading Loading
packages/SystemUI/src/com/android/systemui/doze/util/BurnInHelper.kt +3 −2 Original line number Diff line number Diff line Loading @@ -24,7 +24,6 @@ private const val BURN_IN_PREVENTION_PERIOD_Y = 521f private const val BURN_IN_PREVENTION_PERIOD_X = 83f private const val BURN_IN_PREVENTION_PERIOD_SCALE = 181f private const val BURN_IN_PREVENTION_PERIOD_PROGRESS = 89f private val BASE_BURNIN_SCALE = if (Flags.clockReactiveSmartspaceLayout()) 0.75f else 0.8f /** * Returns the translation offset that should be used to avoid burn in at the current time (in Loading Loading @@ -56,7 +55,9 @@ fun getBurnInProgressOffset(): Float { /** Returns a value to scale a view in order to avoid burn in. */ fun getBurnInScale(): Float { return BASE_BURNIN_SCALE + val multiplier = if (Flags.clockReactiveSmartspaceLayout()) 0.75f else 0.8f return multiplier + zigzag( System.currentTimeMillis() / MILLIS_PER_MINUTES, 0.2f, Loading
packages/SystemUI/src/com/android/systemui/keyguard/ui/viewmodel/AodBurnInViewModel.kt +3 −2 Original line number Diff line number Diff line Loading @@ -192,17 +192,18 @@ 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, MAX_LARGE_CLOCK_SCALE, 1f - interpolated), scale = MathUtils.lerp(burnIn.scale, stopScale, 1f - interpolated), scaleClockOnly = useScaleOnly, ) } } companion object { private val MAX_LARGE_CLOCK_SCALE = if (Flags.clockReactiveSmartspaceLayout()) 0.9f else 1f private const val MAX_LARGE_CLOCK_SCALE = 0.9f } } Loading