Merge "AOD lock icons should always be white" into sc-v2-dev am: da7af7d887
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/16357918 Change-Id: I276226185d6f155fed59f50c13d4db7bcf778d63
This commit is contained in:
@@ -18,6 +18,7 @@ package com.android.keyguard;
|
||||
|
||||
import android.content.Context;
|
||||
import android.content.res.ColorStateList;
|
||||
import android.graphics.Color;
|
||||
import android.graphics.PointF;
|
||||
import android.graphics.RectF;
|
||||
import android.graphics.drawable.Drawable;
|
||||
@@ -30,6 +31,7 @@ import androidx.annotation.IntDef;
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.annotation.VisibleForTesting;
|
||||
|
||||
import com.android.internal.graphics.ColorUtils;
|
||||
import com.android.settingslib.Utils;
|
||||
import com.android.systemui.Dumpable;
|
||||
import com.android.systemui.R;
|
||||
@@ -82,14 +84,18 @@ public class LockIconView extends FrameLayout implements Dumpable {
|
||||
|
||||
void updateColorAndBackgroundVisibility() {
|
||||
if (mUseBackground && mLockIcon.getDrawable() != null) {
|
||||
mLockIconColor = Utils.getColorAttrDefaultColor(getContext(),
|
||||
android.R.attr.textColorPrimary);
|
||||
mLockIconColor = ColorUtils.blendARGB(
|
||||
Utils.getColorAttrDefaultColor(getContext(), android.R.attr.textColorPrimary),
|
||||
Color.WHITE,
|
||||
mDozeAmount);
|
||||
mBgView.setBackground(getContext().getDrawable(R.drawable.fingerprint_bg));
|
||||
mBgView.setAlpha(1f - mDozeAmount);
|
||||
mBgView.setVisibility(View.VISIBLE);
|
||||
} else {
|
||||
mLockIconColor = Utils.getColorAttrDefaultColor(getContext(),
|
||||
R.attr.wallpaperTextColorAccent);
|
||||
mLockIconColor = ColorUtils.blendARGB(
|
||||
Utils.getColorAttrDefaultColor(getContext(), R.attr.wallpaperTextColorAccent),
|
||||
Color.WHITE,
|
||||
mDozeAmount);
|
||||
mBgView.setVisibility(View.GONE);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user