fix(android): declare FMX's biometric activity, and stop LoadVault from deleting the cache

The prompt raised ActivityNotFoundException: FMX does not show BiometricPrompt from our NativeActivity, it launches its own BiometricFragmentActivity, which lives in fmx.dex.jar but has to be declared in the manifest. Given a translucent framework theme - it hosts the system dialog and draws nothing itself, and the generated resources contain no AppCompat.

Then the read failed and the cache vanished with no trace. LoadVault sorted 'key lost' from 'not authenticated' on the exception message and deleted the file when it guessed the former - so a wrong guess destroyed the cache and the only record of why. It now reports through LastStoreError and deletes nothing; the caller has the log and the context. OpenLocalNow shows the reason, after ShowUnlock rather than before, which was overwriting it.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
r-zakarya
2026-08-15 14:11:20 +01:00
parent 1dc4f3bdb6
commit 8dc0840e03
3 changed files with 43 additions and 14 deletions
+15
View File
@@ -77,6 +77,21 @@
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<!-- FMX n'affiche pas BiometricPrompt depuis notre NativeActivity : il
lance SA PROPRE activite, qui heberge le fragment androidx. Elle
vit dans fmx.dex.jar, mais Android exige qu'elle soit declaree ici
- sinon android.content.ActivityNotFoundException a la premiere
invite, et nulle part avant.
Theme translucide du framework : cette activite ne dessine rien
d'elle-meme, elle ne fait qu'heberger le dialogue systeme. Sans
cela elle recouvrirait l'ecran d'une surface opaque le temps de
l'authentification. On prend un theme @android: et non AppCompat,
absent des ressources generees. -->
<activity
android:name="com.embarcadero.firemonkey.biometricauth.BiometricFragmentActivity"
android:exported="false"
android:theme="@android:style/Theme.Translucent.NoTitleBar" />
<%activity%>
<%receivers%>
</application>