Update remove face enrollment strings for convenience.
Fix: 209877102 Test: manual (enroll & delete) Change-Id: Idb3a8d3622574edc47673e8fe6a72a5b9d449c7b
This commit is contained in:
@@ -22,6 +22,9 @@ import android.app.admin.DevicePolicyManager;
|
||||
import android.content.Context;
|
||||
import android.content.Intent;
|
||||
import android.content.IntentSender;
|
||||
import android.hardware.biometrics.SensorProperties;
|
||||
import android.hardware.face.FaceManager;
|
||||
import android.hardware.face.FaceSensorPropertiesInternal;
|
||||
import android.os.storage.StorageManager;
|
||||
import android.util.Log;
|
||||
import android.view.Surface;
|
||||
@@ -273,4 +276,17 @@ public class BiometricUtils {
|
||||
public static boolean isReverseLandscape(@NonNull Context context) {
|
||||
return context.getDisplay().getRotation() == Surface.ROTATION_270;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param faceManager
|
||||
* @return True if at least one sensor is set as a convenience.
|
||||
*/
|
||||
public static boolean isConvenience(@NonNull FaceManager faceManager) {
|
||||
for (FaceSensorPropertiesInternal props : faceManager.getSensorPropertiesInternal()) {
|
||||
if (props.sensorStrength == SensorProperties.STRENGTH_CONVENIENCE) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user