Merge "Update keyguard fingerprint & face scanning colors" into udc-dev am: b50b3f418c
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/23114258 Change-Id: I8ee9089b4b17def800b114230c1bbb69fcd1a3cd Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -31,10 +31,10 @@ import android.graphics.RectF
|
|||||||
import android.hardware.biometrics.BiometricSourceType
|
import android.hardware.biometrics.BiometricSourceType
|
||||||
import android.view.View
|
import android.view.View
|
||||||
import androidx.core.graphics.ColorUtils
|
import androidx.core.graphics.ColorUtils
|
||||||
|
import com.android.app.animation.Interpolators
|
||||||
import com.android.keyguard.KeyguardUpdateMonitor
|
import com.android.keyguard.KeyguardUpdateMonitor
|
||||||
import com.android.keyguard.KeyguardUpdateMonitorCallback
|
import com.android.keyguard.KeyguardUpdateMonitorCallback
|
||||||
import com.android.settingslib.Utils
|
import com.android.settingslib.Utils
|
||||||
import com.android.app.animation.Interpolators
|
|
||||||
import com.android.systemui.biometrics.AuthController
|
import com.android.systemui.biometrics.AuthController
|
||||||
import com.android.systemui.log.ScreenDecorationsLogger
|
import com.android.systemui.log.ScreenDecorationsLogger
|
||||||
import com.android.systemui.plugins.statusbar.StatusBarStateController
|
import com.android.systemui.plugins.statusbar.StatusBarStateController
|
||||||
@@ -63,7 +63,7 @@ class FaceScanningOverlay(
|
|||||||
private var cameraProtectionColor = Color.BLACK
|
private var cameraProtectionColor = Color.BLACK
|
||||||
|
|
||||||
var faceScanningAnimColor = Utils.getColorAttrDefaultColor(context,
|
var faceScanningAnimColor = Utils.getColorAttrDefaultColor(context,
|
||||||
R.attr.wallpaperTextColorAccent)
|
com.android.internal.R.attr.materialColorPrimaryFixed)
|
||||||
private var cameraProtectionAnimator: ValueAnimator? = null
|
private var cameraProtectionAnimator: ValueAnimator? = null
|
||||||
var hideOverlayRunnable: Runnable? = null
|
var hideOverlayRunnable: Runnable? = null
|
||||||
var faceAuthSucceeded = false
|
var faceAuthSucceeded = false
|
||||||
|
|||||||
@@ -20,7 +20,6 @@ import android.animation.AnimatorListenerAdapter
|
|||||||
import android.app.ActivityTaskManager
|
import android.app.ActivityTaskManager
|
||||||
import android.content.Context
|
import android.content.Context
|
||||||
import android.content.res.Configuration
|
import android.content.res.Configuration
|
||||||
import android.graphics.Color
|
|
||||||
import android.graphics.PixelFormat
|
import android.graphics.PixelFormat
|
||||||
import android.graphics.PorterDuff
|
import android.graphics.PorterDuff
|
||||||
import android.graphics.PorterDuffColorFilter
|
import android.graphics.PorterDuffColorFilter
|
||||||
@@ -436,24 +435,30 @@ private fun LottieAnimationView.addOverlayDynamicColor(
|
|||||||
fun update() {
|
fun update() {
|
||||||
val isKeyguard = reason == REASON_AUTH_KEYGUARD
|
val isKeyguard = reason == REASON_AUTH_KEYGUARD
|
||||||
if (isKeyguard) {
|
if (isKeyguard) {
|
||||||
val color = context.getColor(R.color.numpad_key_color_secondary) // match bouncer color
|
val color =
|
||||||
|
com.android.settingslib.Utils.getColorAttrDefaultColor(
|
||||||
|
context,
|
||||||
|
com.android.internal.R.attr.materialColorPrimaryFixed
|
||||||
|
)
|
||||||
|
val outerRimColor =
|
||||||
|
com.android.settingslib.Utils.getColorAttrDefaultColor(
|
||||||
|
context,
|
||||||
|
com.android.internal.R.attr.materialColorPrimaryFixedDim
|
||||||
|
)
|
||||||
val chevronFill =
|
val chevronFill =
|
||||||
com.android.settingslib.Utils.getColorAttrDefaultColor(
|
com.android.settingslib.Utils.getColorAttrDefaultColor(
|
||||||
context,
|
context,
|
||||||
android.R.attr.textColorPrimaryInverse
|
com.android.internal.R.attr.materialColorOnPrimaryFixed
|
||||||
)
|
)
|
||||||
for (key in listOf(".blue600", ".blue400")) {
|
addValueCallback(KeyPath(".blue600", "**"), LottieProperty.COLOR_FILTER) {
|
||||||
addValueCallback(KeyPath(key, "**"), LottieProperty.COLOR_FILTER) {
|
|
||||||
PorterDuffColorFilter(color, PorterDuff.Mode.SRC_ATOP)
|
PorterDuffColorFilter(color, PorterDuff.Mode.SRC_ATOP)
|
||||||
}
|
}
|
||||||
|
addValueCallback(KeyPath(".blue400", "**"), LottieProperty.COLOR_FILTER) {
|
||||||
|
PorterDuffColorFilter(outerRimColor, PorterDuff.Mode.SRC_ATOP)
|
||||||
}
|
}
|
||||||
addValueCallback(KeyPath(".black", "**"), LottieProperty.COLOR_FILTER) {
|
addValueCallback(KeyPath(".black", "**"), LottieProperty.COLOR_FILTER) {
|
||||||
PorterDuffColorFilter(chevronFill, PorterDuff.Mode.SRC_ATOP)
|
PorterDuffColorFilter(chevronFill, PorterDuff.Mode.SRC_ATOP)
|
||||||
}
|
}
|
||||||
} else if (!isDarkMode(context)) {
|
|
||||||
addValueCallback(KeyPath(".black", "**"), LottieProperty.COLOR_FILTER) {
|
|
||||||
PorterDuffColorFilter(Color.WHITE, PorterDuff.Mode.SRC_ATOP)
|
|
||||||
}
|
|
||||||
} else if (isDarkMode(context)) {
|
} else if (isDarkMode(context)) {
|
||||||
for (key in listOf(".blue600", ".blue400")) {
|
for (key in listOf(".blue600", ".blue400")) {
|
||||||
addValueCallback(KeyPath(key, "**"), LottieProperty.COLOR_FILTER) {
|
addValueCallback(KeyPath(key, "**"), LottieProperty.COLOR_FILTER) {
|
||||||
|
|||||||
@@ -176,9 +176,9 @@ public class UdfpsKeyguardViewLegacy extends UdfpsAnimationView {
|
|||||||
}
|
}
|
||||||
|
|
||||||
mTextColorPrimary = Utils.getColorAttrDefaultColor(mContext,
|
mTextColorPrimary = Utils.getColorAttrDefaultColor(mContext,
|
||||||
android.R.attr.textColorPrimary);
|
com.android.internal.R.attr.materialColorOnSurface);
|
||||||
final int backgroundColor = Utils.getColorAttrDefaultColor(getContext(),
|
final int backgroundColor = Utils.getColorAttrDefaultColor(getContext(),
|
||||||
com.android.internal.R.attr.colorSurface);
|
com.android.internal.R.attr.materialColorSurfaceContainerHigh);
|
||||||
mBgProtection.setImageTintList(ColorStateList.valueOf(backgroundColor));
|
mBgProtection.setImageTintList(ColorStateList.valueOf(backgroundColor));
|
||||||
mLockScreenFp.invalidate(); // updated with a valueCallback
|
mLockScreenFp.invalidate(); // updated with a valueCallback
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user