Loading core/java/android/hardware/face/FaceManager.java +4 −3 Original line number Diff line number Diff line Loading @@ -47,6 +47,7 @@ import android.view.Surface; import com.android.internal.R; import com.android.internal.os.SomeArgs; import java.util.ArrayList; import java.util.List; import java.util.concurrent.CountDownLatch; import java.util.concurrent.TimeUnit; Loading Loading @@ -622,16 +623,16 @@ public class FaceManager implements BiometricAuthenticator, BiometricFaceConstan */ @RequiresPermission(USE_BIOMETRIC_INTERNAL) @NonNull public FaceSensorProperties getSensorProperties() { public List<FaceSensorProperties> getSensorProperties() { try { if (mService == null || !mService.isHardwareDetected(mContext.getOpPackageName())) { return new FaceSensorProperties(); return new ArrayList<>(); } return mService.getSensorProperties(mContext.getOpPackageName()); } catch (RemoteException e) { e.rethrowFromSystemServer(); } return new FaceSensorProperties(); return new ArrayList<>(); } /** Loading core/java/android/hardware/face/FaceSensorProperties.java +5 −8 Original line number Diff line number Diff line Loading @@ -25,23 +25,19 @@ import android.os.Parcelable; */ public class FaceSensorProperties implements Parcelable { public final int sensorId; public final boolean supportsFaceDetection; /** * Creates a SensorProperties class with safe default values */ public FaceSensorProperties() { supportsFaceDetection = false; } /** * Initializes SensorProperties with specified values */ public FaceSensorProperties(boolean supportsFaceDetection) { public FaceSensorProperties(int sensorId, boolean supportsFaceDetection) { this.sensorId = sensorId; this.supportsFaceDetection = supportsFaceDetection; } protected FaceSensorProperties(Parcel in) { sensorId = in.readInt(); supportsFaceDetection = in.readBoolean(); } Loading @@ -65,6 +61,7 @@ public class FaceSensorProperties implements Parcelable { @Override public void writeToParcel(Parcel dest, int flags) { dest.writeInt(sensorId); dest.writeBoolean(supportsFaceDetection); } } core/java/android/hardware/face/IFaceService.aidl +3 −3 Original line number Diff line number Diff line Loading @@ -28,6 +28,9 @@ import android.view.Surface; * @hide */ interface IFaceService { // Retrieve static sensor properties for all face sensors List<FaceSensorProperties> getSensorProperties(String opPackageName); // Authenticate the given sessionId with a face void authenticate(IBinder token, long operationId, int userid, IFaceServiceReceiver receiver, String opPackageName); Loading Loading @@ -88,9 +91,6 @@ interface IFaceService { // Determine if a user has at least one enrolled face boolean hasEnrolledFaces(int userId, String opPackageName); // Retrieve static sensor properties FaceSensorProperties getSensorProperties(String opPackageName); // Return the LockoutTracker status for the specified user int getLockoutModeForUser(int userId); Loading core/java/android/hardware/fingerprint/FingerprintManager.java +19 −18 Original line number Diff line number Diff line Loading @@ -50,6 +50,7 @@ import android.util.Slog; import android.view.Surface; import java.security.Signature; import java.util.ArrayList; import java.util.List; import java.util.concurrent.CountDownLatch; import java.util.concurrent.Executor; Loading Loading @@ -736,24 +737,6 @@ public class FingerprintManager implements BiometricAuthenticator, BiometricFing return hasEnrolledFingerprints(userId); } /** * @hide */ @RequiresPermission(USE_BIOMETRIC_INTERNAL) public boolean isUdfps() { if (mService == null) { Slog.w(TAG, "isUdfps: no fingerprint service"); return false; } try { return mService.isUdfps(); } catch (RemoteException e) { e.rethrowFromSystemServer(); } return false; } /** * @hide */ Loading Loading @@ -861,6 +844,24 @@ public class FingerprintManager implements BiometricAuthenticator, BiometricFing return false; } /** * Get statically configured sensor properties. * @hide */ @RequiresPermission(USE_BIOMETRIC_INTERNAL) @NonNull public List<FingerprintSensorProperties> getSensorProperties() { try { if (mService == null || !mService.isHardwareDetected(mContext.getOpPackageName())) { return new ArrayList<>(); } return mService.getSensorProperties(mContext.getOpPackageName()); } catch (RemoteException e) { e.rethrowFromSystemServer(); } return new ArrayList<>(); } /** * @hide */ Loading core/java/android/hardware/fingerprint/FingerprintSensorProperties.aidl 0 → 100644 +18 −0 Original line number Diff line number Diff line /* * Copyright (C) 2020 The Android Open Source Project * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package android.hardware.fingerprint; parcelable FingerprintSensorProperties; No newline at end of file Loading
core/java/android/hardware/face/FaceManager.java +4 −3 Original line number Diff line number Diff line Loading @@ -47,6 +47,7 @@ import android.view.Surface; import com.android.internal.R; import com.android.internal.os.SomeArgs; import java.util.ArrayList; import java.util.List; import java.util.concurrent.CountDownLatch; import java.util.concurrent.TimeUnit; Loading Loading @@ -622,16 +623,16 @@ public class FaceManager implements BiometricAuthenticator, BiometricFaceConstan */ @RequiresPermission(USE_BIOMETRIC_INTERNAL) @NonNull public FaceSensorProperties getSensorProperties() { public List<FaceSensorProperties> getSensorProperties() { try { if (mService == null || !mService.isHardwareDetected(mContext.getOpPackageName())) { return new FaceSensorProperties(); return new ArrayList<>(); } return mService.getSensorProperties(mContext.getOpPackageName()); } catch (RemoteException e) { e.rethrowFromSystemServer(); } return new FaceSensorProperties(); return new ArrayList<>(); } /** Loading
core/java/android/hardware/face/FaceSensorProperties.java +5 −8 Original line number Diff line number Diff line Loading @@ -25,23 +25,19 @@ import android.os.Parcelable; */ public class FaceSensorProperties implements Parcelable { public final int sensorId; public final boolean supportsFaceDetection; /** * Creates a SensorProperties class with safe default values */ public FaceSensorProperties() { supportsFaceDetection = false; } /** * Initializes SensorProperties with specified values */ public FaceSensorProperties(boolean supportsFaceDetection) { public FaceSensorProperties(int sensorId, boolean supportsFaceDetection) { this.sensorId = sensorId; this.supportsFaceDetection = supportsFaceDetection; } protected FaceSensorProperties(Parcel in) { sensorId = in.readInt(); supportsFaceDetection = in.readBoolean(); } Loading @@ -65,6 +61,7 @@ public class FaceSensorProperties implements Parcelable { @Override public void writeToParcel(Parcel dest, int flags) { dest.writeInt(sensorId); dest.writeBoolean(supportsFaceDetection); } }
core/java/android/hardware/face/IFaceService.aidl +3 −3 Original line number Diff line number Diff line Loading @@ -28,6 +28,9 @@ import android.view.Surface; * @hide */ interface IFaceService { // Retrieve static sensor properties for all face sensors List<FaceSensorProperties> getSensorProperties(String opPackageName); // Authenticate the given sessionId with a face void authenticate(IBinder token, long operationId, int userid, IFaceServiceReceiver receiver, String opPackageName); Loading Loading @@ -88,9 +91,6 @@ interface IFaceService { // Determine if a user has at least one enrolled face boolean hasEnrolledFaces(int userId, String opPackageName); // Retrieve static sensor properties FaceSensorProperties getSensorProperties(String opPackageName); // Return the LockoutTracker status for the specified user int getLockoutModeForUser(int userId); Loading
core/java/android/hardware/fingerprint/FingerprintManager.java +19 −18 Original line number Diff line number Diff line Loading @@ -50,6 +50,7 @@ import android.util.Slog; import android.view.Surface; import java.security.Signature; import java.util.ArrayList; import java.util.List; import java.util.concurrent.CountDownLatch; import java.util.concurrent.Executor; Loading Loading @@ -736,24 +737,6 @@ public class FingerprintManager implements BiometricAuthenticator, BiometricFing return hasEnrolledFingerprints(userId); } /** * @hide */ @RequiresPermission(USE_BIOMETRIC_INTERNAL) public boolean isUdfps() { if (mService == null) { Slog.w(TAG, "isUdfps: no fingerprint service"); return false; } try { return mService.isUdfps(); } catch (RemoteException e) { e.rethrowFromSystemServer(); } return false; } /** * @hide */ Loading Loading @@ -861,6 +844,24 @@ public class FingerprintManager implements BiometricAuthenticator, BiometricFing return false; } /** * Get statically configured sensor properties. * @hide */ @RequiresPermission(USE_BIOMETRIC_INTERNAL) @NonNull public List<FingerprintSensorProperties> getSensorProperties() { try { if (mService == null || !mService.isHardwareDetected(mContext.getOpPackageName())) { return new ArrayList<>(); } return mService.getSensorProperties(mContext.getOpPackageName()); } catch (RemoteException e) { e.rethrowFromSystemServer(); } return new ArrayList<>(); } /** * @hide */ Loading
core/java/android/hardware/fingerprint/FingerprintSensorProperties.aidl 0 → 100644 +18 −0 Original line number Diff line number Diff line /* * Copyright (C) 2020 The Android Open Source Project * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package android.hardware.fingerprint; parcelable FingerprintSensorProperties; No newline at end of file