Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit da7af7d8 authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge "AOD lock icons should always be white" into sc-v2-dev

parents 32e61218 0e9765ae
Loading
Loading
Loading
Loading
+10 −4
Original line number Diff line number Diff line
@@ -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);
        }