diff --git a/app/build.gradle b/app/build.gradle
index 84aa8b85..0d228426 100644
--- a/app/build.gradle
+++ b/app/build.gradle
@@ -56,7 +56,7 @@ android {
}
dependencies {
- implementation 'com.github.SimpleMobileTools:Simple-Commons:f07ca31126'
+ implementation 'com.github.SimpleMobileTools:Simple-Commons:1b7865f1bf'
implementation 'androidx.constraintlayout:constraintlayout:2.0.4'
implementation 'androidx.documentfile:documentfile:1.0.1'
diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml
index e558a4ef..36bd7705 100644
--- a/app/src/main/AndroidManifest.xml
+++ b/app/src/main/AndroidManifest.xml
@@ -8,9 +8,8 @@
-
+
+
+ if (success) {
+ mCurrentNote.protectionHash = hash
+ mCurrentNote.protectionType = type
+ NotesHelper(this).insertOrUpdateNote(mCurrentNote) {
+ invalidateOptionsMenu()
+ }
+ }
+ }
}
private fun unlockNote() {
-
+ SecurityDialog(this, mCurrentNote.protectionHash, mCurrentNote.protectionType) { hash, type, success ->
+ if (success) {
+ mCurrentNote.protectionHash = ""
+ mCurrentNote.protectionType = PROTECTION_NONE
+ NotesHelper(this).insertOrUpdateNote(mCurrentNote) {
+ invalidateOptionsMenu()
+ }
+ }
+ }
}
fun currentNoteTextChanged(newText: String, showUndo: Boolean, showRedo: Boolean) {