Loading packages/SystemUI/res/layout/auth_biometric_face_to_udfps_view.xml→packages/SystemUI/res/layout/auth_biometric_face_to_fingerprint_view.xml +2 −2 Original line number Diff line number Diff line Loading @@ -14,7 +14,7 @@ ~ limitations under the License. --> <com.android.systemui.biometrics.AuthBiometricFaceToUdfpsView <com.android.systemui.biometrics.AuthBiometricFaceToFingerprintView xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="wrap_content" Loading @@ -22,4 +22,4 @@ <include layout="@layout/auth_biometric_contents"/> </com.android.systemui.biometrics.AuthBiometricFaceToUdfpsView> No newline at end of file </com.android.systemui.biometrics.AuthBiometricFaceToFingerprintView> No newline at end of file packages/SystemUI/src/com/android/systemui/biometrics/AuthBiometricFaceToUdfpsView.java→packages/SystemUI/src/com/android/systemui/biometrics/AuthBiometricFaceToFingerprintView.java +16 −13 Original line number Diff line number Diff line Loading @@ -32,12 +32,12 @@ import android.widget.TextView; import com.android.systemui.R; /** * Manages the layout of an auth dialog for devices with a face sensor and an under-display * fingerprint sensor (UDFPS). Face authentication is attempted first, followed by fingerprint if * the initial attempt is unsuccessful. * Manages the layout of an auth dialog for devices with both a face sensor and a fingerprint * sensor. Face authentication is attempted first, followed by fingerprint if the initial attempt is * unsuccessful. */ public class AuthBiometricFaceToUdfpsView extends AuthBiometricFaceView { private static final String TAG = "BiometricPrompt/AuthBiometricFaceToUdfpsView"; public class AuthBiometricFaceToFingerprintView extends AuthBiometricFaceView { private static final String TAG = "BiometricPrompt/AuthBiometricFaceToFingerprintView"; protected static class UdfpsIconController extends IconController { protected UdfpsIconController( Loading Loading @@ -87,20 +87,23 @@ public class AuthBiometricFaceToUdfpsView extends AuthBiometricFaceView { @BiometricAuthenticator.Modality private int mActiveSensorType = TYPE_FACE; @Nullable UdfpsDialogMeasureAdapter mMeasureAdapter; @Nullable private UdfpsIconController mUdfpsIconController; @Nullable UdfpsDialogMeasureAdapter mUdfpsMeasureAdapter; public AuthBiometricFaceToUdfpsView(Context context) { public AuthBiometricFaceToFingerprintView(Context context) { super(context); } public AuthBiometricFaceToUdfpsView(Context context, AttributeSet attrs) { public AuthBiometricFaceToFingerprintView(Context context, AttributeSet attrs) { super(context, attrs); } void setFingerprintSensorProps(@NonNull FingerprintSensorPropertiesInternal sensorProps) { if (mMeasureAdapter == null || mMeasureAdapter.getSensorProps() != sensorProps) { mMeasureAdapter = new UdfpsDialogMeasureAdapter(this, sensorProps); if (!sensorProps.isAnyUdfpsType()) { return; } if (mUdfpsMeasureAdapter == null || mUdfpsMeasureAdapter.getSensorProps() != sensorProps) { mUdfpsMeasureAdapter = new UdfpsDialogMeasureAdapter(this, sensorProps); } } Loading Loading @@ -140,8 +143,8 @@ public class AuthBiometricFaceToUdfpsView extends AuthBiometricFaceView { @NonNull AuthDialog.LayoutParams onMeasureInternal(int width, int height) { final AuthDialog.LayoutParams layoutParams = super.onMeasureInternal(width, height); return mMeasureAdapter != null ? mMeasureAdapter.onMeasureInternal(width, height, layoutParams) return mUdfpsMeasureAdapter != null ? mUdfpsMeasureAdapter.onMeasureInternal(width, height, layoutParams) : layoutParams; } } packages/SystemUI/src/com/android/systemui/biometrics/AuthContainerView.java +7 −7 Original line number Diff line number Diff line Loading @@ -348,14 +348,14 @@ public class AuthContainerView extends LinearLayout } } if (fingerprintSensorProps != null && fingerprintSensorProps.isAnyUdfpsType()) { final AuthBiometricFaceToUdfpsView faceToUdfpsView = (AuthBiometricFaceToUdfpsView) factory.inflate( R.layout.auth_biometric_face_to_udfps_view, null, false); faceToUdfpsView.setFingerprintSensorProps(fingerprintSensorProps); mBiometricView = faceToUdfpsView; if (fingerprintSensorProps != null) { final AuthBiometricFaceToFingerprintView faceToFingerprintView = (AuthBiometricFaceToFingerprintView) factory.inflate( R.layout.auth_biometric_face_to_fingerprint_view, null, false); faceToFingerprintView.setFingerprintSensorProps(fingerprintSensorProps); mBiometricView = faceToFingerprintView; } else { Log.e(TAG, "Fingerprint must be UDFPS for dual-sensor config"); Log.e(TAG, "Fingerprint props not found for sensor ID: " + fingerprintSensorId); mBiometricView = null; mBackgroundView = null; mBiometricScrollView = null; Loading Loading
packages/SystemUI/res/layout/auth_biometric_face_to_udfps_view.xml→packages/SystemUI/res/layout/auth_biometric_face_to_fingerprint_view.xml +2 −2 Original line number Diff line number Diff line Loading @@ -14,7 +14,7 @@ ~ limitations under the License. --> <com.android.systemui.biometrics.AuthBiometricFaceToUdfpsView <com.android.systemui.biometrics.AuthBiometricFaceToFingerprintView xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="wrap_content" Loading @@ -22,4 +22,4 @@ <include layout="@layout/auth_biometric_contents"/> </com.android.systemui.biometrics.AuthBiometricFaceToUdfpsView> No newline at end of file </com.android.systemui.biometrics.AuthBiometricFaceToFingerprintView> No newline at end of file
packages/SystemUI/src/com/android/systemui/biometrics/AuthBiometricFaceToUdfpsView.java→packages/SystemUI/src/com/android/systemui/biometrics/AuthBiometricFaceToFingerprintView.java +16 −13 Original line number Diff line number Diff line Loading @@ -32,12 +32,12 @@ import android.widget.TextView; import com.android.systemui.R; /** * Manages the layout of an auth dialog for devices with a face sensor and an under-display * fingerprint sensor (UDFPS). Face authentication is attempted first, followed by fingerprint if * the initial attempt is unsuccessful. * Manages the layout of an auth dialog for devices with both a face sensor and a fingerprint * sensor. Face authentication is attempted first, followed by fingerprint if the initial attempt is * unsuccessful. */ public class AuthBiometricFaceToUdfpsView extends AuthBiometricFaceView { private static final String TAG = "BiometricPrompt/AuthBiometricFaceToUdfpsView"; public class AuthBiometricFaceToFingerprintView extends AuthBiometricFaceView { private static final String TAG = "BiometricPrompt/AuthBiometricFaceToFingerprintView"; protected static class UdfpsIconController extends IconController { protected UdfpsIconController( Loading Loading @@ -87,20 +87,23 @@ public class AuthBiometricFaceToUdfpsView extends AuthBiometricFaceView { @BiometricAuthenticator.Modality private int mActiveSensorType = TYPE_FACE; @Nullable UdfpsDialogMeasureAdapter mMeasureAdapter; @Nullable private UdfpsIconController mUdfpsIconController; @Nullable UdfpsDialogMeasureAdapter mUdfpsMeasureAdapter; public AuthBiometricFaceToUdfpsView(Context context) { public AuthBiometricFaceToFingerprintView(Context context) { super(context); } public AuthBiometricFaceToUdfpsView(Context context, AttributeSet attrs) { public AuthBiometricFaceToFingerprintView(Context context, AttributeSet attrs) { super(context, attrs); } void setFingerprintSensorProps(@NonNull FingerprintSensorPropertiesInternal sensorProps) { if (mMeasureAdapter == null || mMeasureAdapter.getSensorProps() != sensorProps) { mMeasureAdapter = new UdfpsDialogMeasureAdapter(this, sensorProps); if (!sensorProps.isAnyUdfpsType()) { return; } if (mUdfpsMeasureAdapter == null || mUdfpsMeasureAdapter.getSensorProps() != sensorProps) { mUdfpsMeasureAdapter = new UdfpsDialogMeasureAdapter(this, sensorProps); } } Loading Loading @@ -140,8 +143,8 @@ public class AuthBiometricFaceToUdfpsView extends AuthBiometricFaceView { @NonNull AuthDialog.LayoutParams onMeasureInternal(int width, int height) { final AuthDialog.LayoutParams layoutParams = super.onMeasureInternal(width, height); return mMeasureAdapter != null ? mMeasureAdapter.onMeasureInternal(width, height, layoutParams) return mUdfpsMeasureAdapter != null ? mUdfpsMeasureAdapter.onMeasureInternal(width, height, layoutParams) : layoutParams; } }
packages/SystemUI/src/com/android/systemui/biometrics/AuthContainerView.java +7 −7 Original line number Diff line number Diff line Loading @@ -348,14 +348,14 @@ public class AuthContainerView extends LinearLayout } } if (fingerprintSensorProps != null && fingerprintSensorProps.isAnyUdfpsType()) { final AuthBiometricFaceToUdfpsView faceToUdfpsView = (AuthBiometricFaceToUdfpsView) factory.inflate( R.layout.auth_biometric_face_to_udfps_view, null, false); faceToUdfpsView.setFingerprintSensorProps(fingerprintSensorProps); mBiometricView = faceToUdfpsView; if (fingerprintSensorProps != null) { final AuthBiometricFaceToFingerprintView faceToFingerprintView = (AuthBiometricFaceToFingerprintView) factory.inflate( R.layout.auth_biometric_face_to_fingerprint_view, null, false); faceToFingerprintView.setFingerprintSensorProps(fingerprintSensorProps); mBiometricView = faceToFingerprintView; } else { Log.e(TAG, "Fingerprint must be UDFPS for dual-sensor config"); Log.e(TAG, "Fingerprint props not found for sensor ID: " + fingerprintSensorId); mBiometricView = null; mBackgroundView = null; mBiometricScrollView = null; Loading