Loading core/java/android/hardware/fingerprint/FingerprintManager.java +9 −0 Original line number Diff line number Diff line Loading @@ -464,6 +464,12 @@ public class FingerprintManager implements BiometricAuthenticator, BiometricFing * @param remaining The number of remaining steps */ public void onEnrollmentProgress(int remaining) { } /** * Called when a fingerprint image has been acquired. * @param isAcquiredGood whether the fingerprint image was good. */ public void onAcquired(boolean isAcquiredGood){ } } /** Loading Loading @@ -1392,6 +1398,9 @@ public class FingerprintManager implements BiometricAuthenticator, BiometricFing if (mAuthenticationCallback != null) { mAuthenticationCallback.onAuthenticationAcquired(acquireInfo); } if (mEnrollmentCallback != null) { mEnrollmentCallback.onAcquired(acquireInfo == FINGERPRINT_ACQUIRED_GOOD); } final String msg = getAcquiredString(mContext, acquireInfo, vendorCode); if (msg == null) { return; Loading core/java/android/util/FeatureFlagUtils.java +9 −0 Original line number Diff line number Diff line Loading @@ -158,6 +158,14 @@ public class FeatureFlagUtils { */ public static final String SETTINGS_FLASH_ALERTS = "settings_flash_alerts"; /** * Flag to disable/enable showing udfps enroll view in settings. If it's disabled, udfps enroll * view is shown in system ui. * @hide */ public static final String SETTINGS_SHOW_UDFPS_ENROLL_IN_SETTINGS = "settings_show_udfps_enroll_in_settings"; private static final Map<String, String> DEFAULT_FLAGS; static { Loading Loading @@ -198,6 +206,7 @@ public class FeatureFlagUtils { DEFAULT_FLAGS.put(SETTINGS_PREFER_ACCESSIBILITY_MENU_IN_SYSTEM, "false"); DEFAULT_FLAGS.put(SETTINGS_AUDIO_ROUTING, "false"); DEFAULT_FLAGS.put(SETTINGS_FLASH_ALERTS, "false"); DEFAULT_FLAGS.put(SETTINGS_SHOW_UDFPS_ENROLL_IN_SETTINGS, "false"); } private static final Set<String> PERSISTENT_FLAGS; Loading packages/SystemUI/ktfmt_includes.txt +2 −2 Original line number Diff line number Diff line Loading @@ -80,8 +80,8 @@ -packages/SystemUI/src/com/android/systemui/biometrics/UdfpsControllerOverlay.kt -packages/SystemUI/src/com/android/systemui/biometrics/UdfpsDrawable.kt -packages/SystemUI/src/com/android/systemui/biometrics/UdfpsFpDrawable.kt -packages/SystemUI/src/com/android/systemui/biometrics/UdfpsFpmOtherView.kt -packages/SystemUI/src/com/android/systemui/biometrics/UdfpsFpmOtherViewController.kt -packages/SystemUI/src/com/android/systemui/biometrics/UdfpsFpmEmptyView.kt -packages/SystemUI/src/com/android/systemui/biometrics/UdfpsFpmEmptyViewController.kt -packages/SystemUI/src/com/android/systemui/biometrics/UdfpsHapticsSimulator.kt -packages/SystemUI/src/com/android/systemui/biometrics/UdfpsOverlayParams.kt -packages/SystemUI/src/com/android/systemui/biometrics/UdfpsShell.kt Loading packages/SystemUI/res/layout/udfps_fpm_other_view.xml→packages/SystemUI/res/layout/udfps_fpm_empty_view.xml +2 −8 Original line number Diff line number Diff line Loading @@ -14,15 +14,9 @@ ~ See the License for the specific language governing permissions and ~ limitations under the License. --> <com.android.systemui.biometrics.UdfpsFpmOtherView <com.android.systemui.biometrics.UdfpsFpmEmptyView xmlns:android="http://schemas.android.com/apk/res/android" android:id="@+id/udfps_animation_view" android:layout_width="match_parent" android:layout_height="match_parent"> <!-- Fingerprint --> <ImageView android:id="@+id/udfps_fpm_other_fp_view" android:layout_width="match_parent" android:layout_height="match_parent"/> </com.android.systemui.biometrics.UdfpsFpmOtherView> </com.android.systemui.biometrics.UdfpsFpmEmptyView> packages/SystemUI/src/com/android/systemui/biometrics/UdfpsControllerOverlay.kt +27 −14 Original line number Diff line number Diff line Loading @@ -33,6 +33,7 @@ import android.hardware.fingerprint.IUdfpsOverlayControllerCallback import android.os.Build import android.os.RemoteException import android.provider.Settings import android.util.FeatureFlagUtils import android.util.Log import android.util.RotationUtils import android.view.LayoutInflater Loading Loading @@ -232,6 +233,17 @@ class UdfpsControllerOverlay @JvmOverloads constructor( return when (filteredRequestReason) { REASON_ENROLL_FIND_SENSOR, REASON_ENROLL_ENROLLING -> { if (FeatureFlagUtils.isEnabled(context, FeatureFlagUtils.SETTINGS_SHOW_UDFPS_ENROLL_IN_SETTINGS)) { // Enroll udfps UI is handled by settings, so use empty view here UdfpsFpmEmptyViewController( view.addUdfpsView(R.layout.udfps_fpm_empty_view), statusBarStateController, shadeExpansionStateManager, dialogManager, dumpManager ) } else { UdfpsEnrollViewController( view.addUdfpsView(R.layout.udfps_enroll_view) { updateSensorLocation(sensorBounds) Loading @@ -245,6 +257,7 @@ class UdfpsControllerOverlay @JvmOverloads constructor( overlayParams.scaleFactor ) } } REASON_AUTH_KEYGUARD -> { UdfpsKeyguardViewController( view.addUdfpsView(R.layout.udfps_keyguard_view), Loading Loading @@ -277,8 +290,8 @@ class UdfpsControllerOverlay @JvmOverloads constructor( } REASON_AUTH_OTHER, REASON_AUTH_SETTINGS -> { UdfpsFpmOtherViewController( view.addUdfpsView(R.layout.udfps_fpm_other_view), UdfpsFpmEmptyViewController( view.addUdfpsView(R.layout.udfps_fpm_empty_view), statusBarStateController, shadeExpansionStateManager, dialogManager, Loading Loading
core/java/android/hardware/fingerprint/FingerprintManager.java +9 −0 Original line number Diff line number Diff line Loading @@ -464,6 +464,12 @@ public class FingerprintManager implements BiometricAuthenticator, BiometricFing * @param remaining The number of remaining steps */ public void onEnrollmentProgress(int remaining) { } /** * Called when a fingerprint image has been acquired. * @param isAcquiredGood whether the fingerprint image was good. */ public void onAcquired(boolean isAcquiredGood){ } } /** Loading Loading @@ -1392,6 +1398,9 @@ public class FingerprintManager implements BiometricAuthenticator, BiometricFing if (mAuthenticationCallback != null) { mAuthenticationCallback.onAuthenticationAcquired(acquireInfo); } if (mEnrollmentCallback != null) { mEnrollmentCallback.onAcquired(acquireInfo == FINGERPRINT_ACQUIRED_GOOD); } final String msg = getAcquiredString(mContext, acquireInfo, vendorCode); if (msg == null) { return; Loading
core/java/android/util/FeatureFlagUtils.java +9 −0 Original line number Diff line number Diff line Loading @@ -158,6 +158,14 @@ public class FeatureFlagUtils { */ public static final String SETTINGS_FLASH_ALERTS = "settings_flash_alerts"; /** * Flag to disable/enable showing udfps enroll view in settings. If it's disabled, udfps enroll * view is shown in system ui. * @hide */ public static final String SETTINGS_SHOW_UDFPS_ENROLL_IN_SETTINGS = "settings_show_udfps_enroll_in_settings"; private static final Map<String, String> DEFAULT_FLAGS; static { Loading Loading @@ -198,6 +206,7 @@ public class FeatureFlagUtils { DEFAULT_FLAGS.put(SETTINGS_PREFER_ACCESSIBILITY_MENU_IN_SYSTEM, "false"); DEFAULT_FLAGS.put(SETTINGS_AUDIO_ROUTING, "false"); DEFAULT_FLAGS.put(SETTINGS_FLASH_ALERTS, "false"); DEFAULT_FLAGS.put(SETTINGS_SHOW_UDFPS_ENROLL_IN_SETTINGS, "false"); } private static final Set<String> PERSISTENT_FLAGS; Loading
packages/SystemUI/ktfmt_includes.txt +2 −2 Original line number Diff line number Diff line Loading @@ -80,8 +80,8 @@ -packages/SystemUI/src/com/android/systemui/biometrics/UdfpsControllerOverlay.kt -packages/SystemUI/src/com/android/systemui/biometrics/UdfpsDrawable.kt -packages/SystemUI/src/com/android/systemui/biometrics/UdfpsFpDrawable.kt -packages/SystemUI/src/com/android/systemui/biometrics/UdfpsFpmOtherView.kt -packages/SystemUI/src/com/android/systemui/biometrics/UdfpsFpmOtherViewController.kt -packages/SystemUI/src/com/android/systemui/biometrics/UdfpsFpmEmptyView.kt -packages/SystemUI/src/com/android/systemui/biometrics/UdfpsFpmEmptyViewController.kt -packages/SystemUI/src/com/android/systemui/biometrics/UdfpsHapticsSimulator.kt -packages/SystemUI/src/com/android/systemui/biometrics/UdfpsOverlayParams.kt -packages/SystemUI/src/com/android/systemui/biometrics/UdfpsShell.kt Loading
packages/SystemUI/res/layout/udfps_fpm_other_view.xml→packages/SystemUI/res/layout/udfps_fpm_empty_view.xml +2 −8 Original line number Diff line number Diff line Loading @@ -14,15 +14,9 @@ ~ See the License for the specific language governing permissions and ~ limitations under the License. --> <com.android.systemui.biometrics.UdfpsFpmOtherView <com.android.systemui.biometrics.UdfpsFpmEmptyView xmlns:android="http://schemas.android.com/apk/res/android" android:id="@+id/udfps_animation_view" android:layout_width="match_parent" android:layout_height="match_parent"> <!-- Fingerprint --> <ImageView android:id="@+id/udfps_fpm_other_fp_view" android:layout_width="match_parent" android:layout_height="match_parent"/> </com.android.systemui.biometrics.UdfpsFpmOtherView> </com.android.systemui.biometrics.UdfpsFpmEmptyView>
packages/SystemUI/src/com/android/systemui/biometrics/UdfpsControllerOverlay.kt +27 −14 Original line number Diff line number Diff line Loading @@ -33,6 +33,7 @@ import android.hardware.fingerprint.IUdfpsOverlayControllerCallback import android.os.Build import android.os.RemoteException import android.provider.Settings import android.util.FeatureFlagUtils import android.util.Log import android.util.RotationUtils import android.view.LayoutInflater Loading Loading @@ -232,6 +233,17 @@ class UdfpsControllerOverlay @JvmOverloads constructor( return when (filteredRequestReason) { REASON_ENROLL_FIND_SENSOR, REASON_ENROLL_ENROLLING -> { if (FeatureFlagUtils.isEnabled(context, FeatureFlagUtils.SETTINGS_SHOW_UDFPS_ENROLL_IN_SETTINGS)) { // Enroll udfps UI is handled by settings, so use empty view here UdfpsFpmEmptyViewController( view.addUdfpsView(R.layout.udfps_fpm_empty_view), statusBarStateController, shadeExpansionStateManager, dialogManager, dumpManager ) } else { UdfpsEnrollViewController( view.addUdfpsView(R.layout.udfps_enroll_view) { updateSensorLocation(sensorBounds) Loading @@ -245,6 +257,7 @@ class UdfpsControllerOverlay @JvmOverloads constructor( overlayParams.scaleFactor ) } } REASON_AUTH_KEYGUARD -> { UdfpsKeyguardViewController( view.addUdfpsView(R.layout.udfps_keyguard_view), Loading Loading @@ -277,8 +290,8 @@ class UdfpsControllerOverlay @JvmOverloads constructor( } REASON_AUTH_OTHER, REASON_AUTH_SETTINGS -> { UdfpsFpmOtherViewController( view.addUdfpsView(R.layout.udfps_fpm_other_view), UdfpsFpmEmptyViewController( view.addUdfpsView(R.layout.udfps_fpm_empty_view), statusBarStateController, shadeExpansionStateManager, dialogManager, Loading