721f767b2924fbeebf5cc3c29637c555401ac573
This commit addresses several critical bugs:
1. **Encryption Locking:** Toggling the lock state on items (recipes, notes, shopping lists) only changed a boolean flag without performing encryption/decryption. This led to crashes when trying to access supposedly locked items.
- The `FileEncryptor` now includes a check to prevent crashes on invalid data.
- The `toggleRecipeLock` function and its equivalents are refactored to use a `SecretKey` to perform cryptography.
- A migration path is included for items "locked" with the old buggy mechanism.
- The UI now consistently uses biometric prompts to retrieve the necessary keys.
- The fix is applied to Recipes, Notes, and Shopping Lists.
2. **SAF Permissions:** The app would crash with a `ParcelableException` during automatic import/export because of lost permissions to the sync folder URI.
- Added a check to verify URI permissions before any file access in `performAutomaticImport`.
3. **Deprecated Code:** Replaced deprecated calls to `keyManager.getSecretKey()` with the new biometric prompt-based flow (`getDecryptionCipher` and `getSecretKeyFromAuthenticatedCipher`) in `JsonImportExportDialog` and for automatic exports.
Description
Noteshop is a versatile and privacy-focused application for managing your notes, shopping lists, and recipes all in one place. It is designed to be simple, efficient, and fully under your control
Languages
Kotlin
98%
Python
2%