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

Commit 7f93a588 authored by Kevin Chyn's avatar Kevin Chyn
Browse files

Get color directly and remove redundant clearMessage()

Fixes: 132204990

Test: Message has proper color
Change-Id: I8ae35a35c4f7151f08fc6c2ffb8e2d5cac216187
parent 7d1e9329
Loading
Loading
Loading
Loading
+2 −8
Original line number Diff line number Diff line
@@ -18,7 +18,6 @@ package com.android.systemui.biometrics;

import android.app.admin.DevicePolicyManager;
import android.content.Context;
import android.content.res.TypedArray;
import android.graphics.PixelFormat;
import android.graphics.PorterDuff;
import android.graphics.drawable.Drawable;
@@ -151,12 +150,8 @@ public abstract class BiometricDialogView extends LinearLayout {
        mDevicePolicyManager = mContext.getSystemService(DevicePolicyManager.class);
        mAnimationTranslationOffset = getResources()
                .getDimension(R.dimen.biometric_dialog_animation_translation_offset);

        TypedArray array = getContext().obtainStyledAttributes(
                new int[]{R.color.biometric_dialog_error, R.color.biometric_dialog_gray});
        mErrorColor = array.getColor(0, 0);
        mTextColor = array.getColor(1, 0);
        array.recycle();
        mErrorColor = getResources().getColor(R.color.biometric_dialog_error);
        mTextColor = getResources().getColor(R.color.biometric_dialog_gray);

        DisplayMetrics metrics = new DisplayMetrics();
        mWindowManager.getDefaultDisplay().getMetrics(metrics);
@@ -225,7 +220,6 @@ public abstract class BiometricDialogView extends LinearLayout {
        mTryAgainButton.setOnClickListener((View v) -> {
            updateState(STATE_AUTHENTICATING);
            showTryAgainButton(false /* show */);
            handleClearMessage();
            mCallback.onTryAgainPressed();
        });