8

I implemented the new biometric lib using setDeviceCredentialAllowed(true) as shown in the official documentation

In this lib there is an activity being used "DeviceCredentialHandlerActivity", this activity has exported=true in the manifest, why is this/is this really needed? As many should know exporting activities should be avoided if possible for security reassons. I have overridden the property with:

<activity android:name="androidx.biometric.DeviceCredentialHandlerActivity"
            android:exported="false"
            tools:replace="android:exported">
        </activity>

and authentication with fingerprint/password is still working on Android 29 AND below.

David
  • 3,971
  • 1
  • 26
  • 65

1 Answers1

1

The commit message for this change:

Export biometric DeviceCredentialHandlerActivity

Ensures that DeviceCredentialHandlerActivity is exported so that other activities can launch it through BiometricPrompt without having to explicitly add it to the corresponding app's manifest.

Community
  • 1
  • 1
Tyborg
  • 81
  • 4
  • 1
    Thanks for that, but I'm still not sure in what specific case this would be needed, do you understand it? – David Apr 07 '20 at 01:33