From 0b87c6f839f944c37f9084b7f529d0c077fcb52e Mon Sep 17 00:00:00 2001 From: Philipp Crocoll Date: Sun, 1 Jun 2014 06:59:36 +0200 Subject: [PATCH] fixed bug: lock database from keyboard was not possible because of wrong action string (after recent modification) --- .../src/keepass2android/softkeyboard/KP2AKeyboard.java | 4 +++- src/keepass2android/intents/Intents.cs | 8 ++++---- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/src/java/KP2ASoftKeyboard2/java/src/keepass2android/softkeyboard/KP2AKeyboard.java b/src/java/KP2ASoftKeyboard2/java/src/keepass2android/softkeyboard/KP2AKeyboard.java index cbc90a12..4338c256 100644 --- a/src/java/KP2ASoftKeyboard2/java/src/keepass2android/softkeyboard/KP2AKeyboard.java +++ b/src/java/KP2ASoftKeyboard2/java/src/keepass2android/softkeyboard/KP2AKeyboard.java @@ -1315,7 +1315,9 @@ public class KP2AKeyboard extends InputMethodService private void onKp2aLockKeyPressed() { - sendBroadcast(new Intent("keepass2android.lock_database")); + String action = getPackageName()+".lock_database"; + android.util.Log.i("KP2A", "sending broadcast with action "+action); + sendBroadcast(new Intent(action)); } diff --git a/src/keepass2android/intents/Intents.cs b/src/keepass2android/intents/Intents.cs index c8d07ef0..a2502eac 100644 --- a/src/keepass2android/intents/Intents.cs +++ b/src/keepass2android/intents/Intents.cs @@ -27,15 +27,15 @@ namespace keepass2android /// Broadcast this intent to lock the database (with quick unlock if enabled) - public const String LockDatabase = "keepass2android."+AppNames.PackagePart+"lock_database"; + public const String LockDatabase = "keepass2android."+AppNames.PackagePart+".lock_database"; /// Broadcast this intent to close the database (no quick unlock, full close) - public const String CloseDatabase = "keepass2android." + AppNames.PackagePart + "close_database"; + public const String CloseDatabase = "keepass2android." + AppNames.PackagePart + ".close_database"; /// This intent will be broadcast once the database has been locked. Sensitive information displayed should be hidden and unloaded. - public const String DatabaseLocked = "keepass2android." + AppNames.PackagePart + "database_locked"; + public const String DatabaseLocked = "keepass2android." + AppNames.PackagePart + ".database_locked"; /// This intent will be broadcast once the keyboard data has been cleared - public const String KeyboardCleared = "keepass2android." + AppNames.PackagePart + "keyboard_cleared"; + public const String KeyboardCleared = "keepass2android." + AppNames.PackagePart + ".keyboard_cleared"; public const String CopyUsername = "keepass2android.copy_username"; public const String CopyPassword = "keepass2android.copy_password";