If device isn't on the keyguard, always use sfps blue colors
These colors aren't themed so that they will match the edu videos. Make SideFpsController robust against (mistake) asset color changes to the lottie sfps_pulse.json and sfps_pulse_landscape.json files. Test: all rotations for side fps Fixes: 280430073 Fixes: 282617503 Change-Id: I0b3830a929ca1a83431aaff959bc62501973c6b3
This commit is contained in:
File diff suppressed because one or more lines are too long
@@ -20,6 +20,7 @@ import android.animation.AnimatorListenerAdapter
|
||||
import android.app.ActivityTaskManager
|
||||
import android.content.Context
|
||||
import android.content.res.Configuration
|
||||
import android.graphics.Color
|
||||
import android.graphics.PixelFormat
|
||||
import android.graphics.PorterDuff
|
||||
import android.graphics.PorterDuffColorFilter
|
||||
@@ -459,7 +460,12 @@ private fun LottieAnimationView.addOverlayDynamicColor(
|
||||
addValueCallback(KeyPath(".black", "**"), LottieProperty.COLOR_FILTER) {
|
||||
PorterDuffColorFilter(chevronFill, PorterDuff.Mode.SRC_ATOP)
|
||||
}
|
||||
} else if (isDarkMode(context)) {
|
||||
} else {
|
||||
if (!isDarkMode(context)) {
|
||||
addValueCallback(KeyPath(".black", "**"), LottieProperty.COLOR_FILTER) {
|
||||
PorterDuffColorFilter(Color.WHITE, PorterDuff.Mode.SRC_ATOP)
|
||||
}
|
||||
}
|
||||
for (key in listOf(".blue600", ".blue400")) {
|
||||
addValueCallback(KeyPath(key, "**"), LottieProperty.COLOR_FILTER) {
|
||||
PorterDuffColorFilter(
|
||||
|
||||
Reference in New Issue
Block a user