Update face/fingerprint consent screen UIs
Makes the following UI changes to the consent screens for face and fingerprint enrollment: - Sets description text in XML rather than in Java - Highlight both primary and secondary buttons - Use extracted highlight color for all icons Test: Manually tested SUW flow Bug: 188922185 Bug: 187458628 Bug: 183710943 Change-Id: I39d9b990dcbb82f443515a2175766dc51ca1180c
This commit is contained in:
@@ -18,6 +18,8 @@ package com.android.settings.biometrics;
|
||||
|
||||
import android.app.admin.DevicePolicyManager;
|
||||
import android.content.Intent;
|
||||
import android.graphics.PorterDuff;
|
||||
import android.graphics.PorterDuffColorFilter;
|
||||
import android.os.Bundle;
|
||||
import android.os.UserHandle;
|
||||
import android.os.UserManager;
|
||||
@@ -25,6 +27,9 @@ import android.util.Log;
|
||||
import android.view.View;
|
||||
import android.widget.TextView;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.annotation.Nullable;
|
||||
|
||||
import com.android.internal.widget.LockPatternUtils;
|
||||
import com.android.settings.R;
|
||||
import com.android.settings.SetupWizardUtils;
|
||||
@@ -34,6 +39,7 @@ import com.android.settings.password.ChooseLockSettingsHelper;
|
||||
import com.google.android.setupcompat.template.FooterButton;
|
||||
import com.google.android.setupcompat.util.WizardManagerHelper;
|
||||
import com.google.android.setupdesign.span.LinkSpan;
|
||||
import com.google.android.setupdesign.util.DynamicColorPalette;
|
||||
|
||||
/**
|
||||
* Abstract base class for the intro onboarding activity for biometric enrollment.
|
||||
@@ -52,6 +58,8 @@ public abstract class BiometricEnrollIntroduction extends BiometricEnrollBase
|
||||
protected boolean mConfirmingCredentials;
|
||||
protected boolean mNextClicked;
|
||||
|
||||
@Nullable private PorterDuffColorFilter mIconColorFilter;
|
||||
|
||||
/**
|
||||
* @return true if the biometric is disabled by a device administrator
|
||||
*/
|
||||
@@ -317,4 +325,14 @@ public abstract class BiometricEnrollIntroduction extends BiometricEnrollBase
|
||||
setDescriptionText(getDescriptionResDisabledByAdmin());
|
||||
}
|
||||
}
|
||||
|
||||
@NonNull
|
||||
protected PorterDuffColorFilter getIconColorFilter() {
|
||||
if (mIconColorFilter == null) {
|
||||
mIconColorFilter = new PorterDuffColorFilter(
|
||||
DynamicColorPalette.getColor(this, DynamicColorPalette.ColorType.ACCENT),
|
||||
PorterDuff.Mode.SRC_IN);
|
||||
}
|
||||
return mIconColorFilter;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user