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

Commit 8aa74d1a authored by Xin Li's avatar Xin Li
Browse files

Merge SP1A.210812.016

Merged-In: Ie9cea79f825b78495b1f93527f3fa980f9b975e3
Change-Id: Ib853137811901796f73e4d720accb3249a7db963
parents c41a577e 3b7fccb2
Loading
Loading
Loading
Loading
+8 −2
Original line number Diff line number Diff line
@@ -20,6 +20,7 @@ import android.app.admin.DevicePolicyManager;
import android.content.Intent;
import android.graphics.PorterDuff;
import android.graphics.PorterDuffColorFilter;
import android.hardware.biometrics.BiometricAuthenticator;
import android.os.Bundle;
import android.os.UserHandle;
import android.os.UserManager;
@@ -62,6 +63,7 @@ public abstract class BiometricEnrollIntroduction extends BiometricEnrollBase
    private TextView mErrorText;
    protected boolean mConfirmingCredentials;
    protected boolean mNextClicked;
    private boolean mParentalConsentRequired;

    @Nullable private PorterDuffColorFilter mIconColorFilter;

@@ -138,6 +140,8 @@ public abstract class BiometricEnrollIntroduction extends BiometricEnrollBase
     */
    public abstract void onClick(LinkSpan span);

    public abstract @BiometricAuthenticator.Modality int getModality();

    protected interface GenerateChallengeCallback {
        void onChallengeGenerated(int sensorId, int userId, long challenge);
    }
@@ -161,7 +165,9 @@ public abstract class BiometricEnrollIntroduction extends BiometricEnrollBase
        mBiometricUnlockDisabledByAdmin = isDisabledByAdmin();

        setContentView(getLayoutResource());
        if (mBiometricUnlockDisabledByAdmin) {
        mParentalConsentRequired = ParentalControlsUtils.parentConsentRequired(this, getModality())
                != null;
        if (mBiometricUnlockDisabledByAdmin && !mParentalConsentRequired) {
            setHeaderText(getHeaderResDisabledByAdmin());
        } else {
            setHeaderText(getHeaderResDefault());
@@ -399,7 +405,7 @@ public abstract class BiometricEnrollIntroduction extends BiometricEnrollBase
    protected void initViews() {
        super.initViews();

        if (mBiometricUnlockDisabledByAdmin) {
        if (mBiometricUnlockDisabledByAdmin && !mParentalConsentRequired) {
            setDescriptionText(getDescriptionResDisabledByAdmin());
        }
    }
+7 −0
Original line number Diff line number Diff line
@@ -18,6 +18,8 @@ package com.android.settings.biometrics.combination;
import android.content.Context;
import android.os.UserHandle;

import androidx.lifecycle.Lifecycle;

/**
 * Preference controller for face settings within the biometrics settings page of work profile,
 * that controls the ability to unlock the phone with face authentication.
@@ -29,6 +31,11 @@ public class BiometricFaceProfileStatusPreferenceController extends
        super(context, key);
    }

    public BiometricFaceProfileStatusPreferenceController(
            Context context, String key, Lifecycle lifecycle) {
        super(context, key, lifecycle);
    }

    @Override
    protected boolean isUserSupported() {
        return mProfileChallengeUserId != UserHandle.USER_NULL
+7 −0
Original line number Diff line number Diff line
@@ -17,6 +17,8 @@ package com.android.settings.biometrics.combination;

import android.content.Context;

import androidx.lifecycle.Lifecycle;

import com.android.settings.Utils;
import com.android.settings.biometrics.face.FaceStatusPreferenceController;

@@ -30,6 +32,11 @@ public class BiometricFaceStatusPreferenceController extends FaceStatusPreferenc
        super(context, key);
    }

    public BiometricFaceStatusPreferenceController(
            Context context, String key, Lifecycle lifecycle) {
        super(context, key, lifecycle);
    }

    @Override
    protected boolean isDeviceSupported() {
        return Utils.isMultipleBiometricsSupported(mContext) && Utils.hasFaceHardware(mContext);
+7 −0
Original line number Diff line number Diff line
@@ -18,6 +18,8 @@ package com.android.settings.biometrics.combination;
import android.content.Context;
import android.os.UserHandle;

import androidx.lifecycle.Lifecycle;

/**
 * Preference controller for fingerprint settings within the biometrics settings page, that controls
 * the ability to unlock the phone with fingerprint.
@@ -29,6 +31,11 @@ public class BiometricFingerprintProfileStatusPreferenceController extends
        super(context, key);
    }

    public BiometricFingerprintProfileStatusPreferenceController(
            Context context, String key, Lifecycle lifecycle) {
        super(context, key, lifecycle);
    }

    @Override
    protected boolean isUserSupported() {
        return mProfileChallengeUserId != UserHandle.USER_NULL
+7 −0
Original line number Diff line number Diff line
@@ -17,6 +17,8 @@ package com.android.settings.biometrics.combination;

import android.content.Context;

import androidx.lifecycle.Lifecycle;

import com.android.settings.Utils;
import com.android.settings.biometrics.fingerprint.FingerprintStatusPreferenceController;

@@ -31,6 +33,11 @@ public class BiometricFingerprintStatusPreferenceController extends
        super(context, key);
    }

    public BiometricFingerprintStatusPreferenceController(
            Context context, String key, Lifecycle lifecycle) {
        super(context, key, lifecycle);
    }

    @Override
    protected boolean isDeviceSupported() {
        return Utils.isMultipleBiometricsSupported(mContext)
Loading