diff --git a/src/AndroidFileChooserBinding/AndroidFileChooserBinding.csproj b/src/AndroidFileChooserBinding/AndroidFileChooserBinding.csproj
index ab5ca1ac..3b3be243 100644
--- a/src/AndroidFileChooserBinding/AndroidFileChooserBinding.csproj
+++ b/src/AndroidFileChooserBinding/AndroidFileChooserBinding.csproj
@@ -10,7 +10,8 @@
AndroidFileChooserBinding
AndroidFileChooserBinding
512
- v5.0
+ v6.0
+ True
true
diff --git a/src/KP2AKdbLibraryBinding/KP2AKdbLibraryBinding.csproj b/src/KP2AKdbLibraryBinding/KP2AKdbLibraryBinding.csproj
index 20ff6272..a0ed90dd 100644
--- a/src/KP2AKdbLibraryBinding/KP2AKdbLibraryBinding.csproj
+++ b/src/KP2AKdbLibraryBinding/KP2AKdbLibraryBinding.csproj
@@ -10,7 +10,8 @@
KP2AKdbLibraryBinding
KP2AKdbLibraryBinding
512
- v5.0
+ v6.0
+ True
true
diff --git a/src/keepass2android/ChangeLog.cs b/src/keepass2android/ChangeLog.cs
index ea5ebbe6..3187ad58 100644
--- a/src/keepass2android/ChangeLog.cs
+++ b/src/keepass2android/ChangeLog.cs
@@ -26,6 +26,7 @@ namespace keepass2android
AlertDialog.Builder builder = new AlertDialog.Builder(new ContextThemeWrapper(ctx, Android.Resource.Style.ThemeHoloLightDialog));
builder.SetTitle(ctx.GetString(Resource.String.ChangeLog_title));
List changeLog = new List{
+ ctx.GetString(Resource.String.ChangeLog_1_0_0e),
ctx.GetString(Resource.String.ChangeLog_1_0_0),
ctx.GetString(Resource.String.ChangeLog_0_9_9c),
ctx.GetString(Resource.String.ChangeLog_0_9_9),
diff --git a/src/keepass2android/DonateReminder.cs b/src/keepass2android/DonateReminder.cs
index e0aecba1..d6bb7a62 100644
--- a/src/keepass2android/DonateReminder.cs
+++ b/src/keepass2android/DonateReminder.cs
@@ -62,11 +62,19 @@ namespace keepass2android
yield return new Reminder
{
From = new DateTime(2016, 09, 17),
- To = new DateTime(2016, 10, 04),
+ To = new DateTime(2016, 09, 26),
Key = "DonationOktoberfest2016"
,ResourceToShow = Resource.Layout.donate
};
yield return new Reminder
+ {
+ From = new DateTime(2016, 09, 26),
+ To = new DateTime(2016, 10, 04),
+ Key = "DonationOktoberfest2016-2"
+ ,
+ ResourceToShow = Resource.Layout.donate
+ };
+ yield return new Reminder
{
From = new DateTime(2017, 09, 16),
To = new DateTime(2017, 09, 25),
diff --git a/src/keepass2android/FingerprintSetupActivity.cs b/src/keepass2android/FingerprintSetupActivity.cs
index 39e43783..19df56de 100644
--- a/src/keepass2android/FingerprintSetupActivity.cs
+++ b/src/keepass2android/FingerprintSetupActivity.cs
@@ -96,7 +96,7 @@ namespace keepass2android
FingerprintUnlockMode newMode;
Enum.TryParse(rbSender.Tag.ToString(), out newMode);
ChangeUnlockMode(_unlockMode, newMode);
-
+
};
}
@@ -118,15 +118,35 @@ namespace keepass2android
FindViewById(Resource.Id.radio_buttons).Visibility = ViewStates.Gone;
FindViewById(Resource.Id.fingerprint_auth_container).Visibility = ViewStates.Gone;
+ FindViewById(Resource.Id.show_keyboard_while_fingerprint).Checked =
+ Util.GetShowKeyboardDuringFingerprintUnlock(this);
- if ((int) Build.VERSION.SdkInt >= 23)
+ FindViewById(Resource.Id.show_keyboard_while_fingerprint).CheckedChange += (sender, args) =>
+ {
+ PreferenceManager.GetDefaultSharedPreferences(this)
+ .Edit()
+ .PutBoolean(GetString(Resource.String.ShowKeyboardWhileFingerprint_key), args.IsChecked)
+ .Commit();
+ };
+ if ((int)Build.VERSION.SdkInt >= 23)
RequestPermissions(new[] {Manifest.Permission.UseFingerprint}, FingerprintPermissionRequestCode);
else
{
TrySetupSamsung();
}
+
+ UpdateKeyboardCheckboxVisibility();
+
+ }
+
+ private void UpdateKeyboardCheckboxVisibility()
+ {
+ FindViewById(Resource.Id.show_keyboard_while_fingerprint).Visibility = (_unlockMode == FingerprintUnlockMode.Disabled) ||
+ (_samsungFingerprint != null)
+ ? ViewStates.Gone
+ : ViewStates.Visible;
}
private bool TrySetupSamsung()
@@ -205,6 +225,7 @@ namespace keepass2android
//seems like not all Samsung Devices (e.g. Note 4) don't support the Android 6 fingerprint API
if (!TrySetupSamsung())
SetError(Resource.String.fingerprint_hardware_error);
+ UpdateKeyboardCheckboxVisibility();
return;
}
if (!fpModule.FingerprintManager.HasEnrolledFingerprints)
@@ -213,6 +234,7 @@ namespace keepass2android
return;
}
ShowRadioButtons();
+ UpdateKeyboardCheckboxVisibility();
}
}
@@ -229,9 +251,12 @@ namespace keepass2android
if (oldMode == newMode)
return;
+
if (_samsungFingerprint != null)
{
_unlockMode = newMode;
+ UpdateKeyboardCheckboxVisibility();
+
ISharedPreferencesEditor edit = PreferenceManager.GetDefaultSharedPreferences(this).Edit();
edit.PutString(App.Kp2a.GetDb().CurrentFingerprintModePrefKey, _unlockMode.ToString());
edit.Commit();
@@ -241,14 +266,17 @@ namespace keepass2android
if (newMode == FingerprintUnlockMode.Disabled)
{
_unlockMode = newMode;
+ UpdateKeyboardCheckboxVisibility();
+
StoreUnlockMode();
return;
}
_desiredUnlockMode = newMode;
FindViewById(Resource.Id.radio_buttons).Visibility = ViewStates.Gone;
- FindViewById(Resource.Id.fingerprint_auth_container).Visibility = ViewStates.Visible;
+ FindViewById(Resource.Id.show_keyboard_while_fingerprint).Visibility = ViewStates.Gone;
+ FindViewById(Resource.Id.fingerprint_auth_container).Visibility = ViewStates.Visible;
_enc = new FingerprintEncryption(new FingerprintModule(this), CurrentPreferenceKey);
try
{
@@ -289,6 +317,8 @@ namespace keepass2android
FindViewById(Resource.Id.fingerprint_auth_container).Visibility = ViewStates.Gone;
StoreUnlockMode();
+ UpdateKeyboardCheckboxVisibility();
+
}, SUCCESS_DELAY_MILLIS);
diff --git a/src/keepass2android/PasswordActivity.cs b/src/keepass2android/PasswordActivity.cs
index 0a1955c2..99f1de8c 100644
--- a/src/keepass2android/PasswordActivity.cs
+++ b/src/keepass2android/PasswordActivity.cs
@@ -1733,12 +1733,7 @@ namespace keepass2android
}
- EditText pwd = FindViewById(Resource.Id.password_edit);
- pwd.PostDelayed(() =>
- {
- InputMethodManager keyboard = (InputMethodManager)GetSystemService(Context.InputMethodService);
- keyboard.ShowSoftInput(pwd, 0);
- }, 50);
+
View killButton = FindViewById(Resource.Id.kill_app);
if (PreferenceManager.GetDefaultSharedPreferences(this)
@@ -1811,19 +1806,33 @@ namespace keepass2android
}
}
+ bool showKeyboard = (Util.GetShowKeyboardDuringFingerprintUnlock(this));
+
+
if (_fingerprintPermissionGranted)
{
- InitFingerprintUnlock();
+ if (!InitFingerprintUnlock())
+ showKeyboard = true;
}
else
{
FindViewById(Resource.Id.fingerprintbtn).Visibility = ViewStates.Gone;
-
+ showKeyboard = true;
}
+
+ EditText pwd = (EditText)FindViewById(Resource.Id.password_edit);
+ pwd.PostDelayed(() =>
+ {
+ InputMethodManager keyboard = (InputMethodManager)GetSystemService(Context.InputMethodService);
+ if (showKeyboard)
+ keyboard.ShowSoftInput(pwd, 0);
+ else
+ keyboard.HideSoftInputFromWindow(pwd.WindowToken, HideSoftInputFlags.ImplicitOnly);
+ }, 50);
}
- private void InitFingerprintUnlock()
+ private bool InitFingerprintUnlock()
{
var btn = FindViewById(Resource.Id.fingerprintbtn);
try
@@ -1834,7 +1843,7 @@ namespace keepass2android
if (um != FingerprintUnlockMode.FullUnlock)
{
- return;
+ return false;
}
FingerprintModule fpModule = new FingerprintModule(this);
@@ -1847,6 +1856,7 @@ namespace keepass2android
{
btn.SetImageResource(Resource.Drawable.ic_fp_40px);
_fingerprintDec.StartListening(new FingerprintAuthCallbackAdapter(this, this));
+ return true;
}
else
{
@@ -1856,6 +1866,7 @@ namespace keepass2android
_fingerprintDec = null;
ClearFingerprintUnlockData();
+ return false;
}
}
catch (Exception e)
@@ -1864,6 +1875,7 @@ namespace keepass2android
btn.Tag = "Error initializing Fingerprint Unlock: " + e;
_fingerprintDec = null;
+ return false;
}
diff --git a/src/keepass2android/QuickUnlock.cs b/src/keepass2android/QuickUnlock.cs
index f55a0742..36aa3ab4 100644
--- a/src/keepass2android/QuickUnlock.cs
+++ b/src/keepass2android/QuickUnlock.cs
@@ -213,7 +213,7 @@ namespace keepass2android
}
- private void InitFingerprintUnlock()
+ private bool InitFingerprintUnlock()
{
Kp2aLog.Log("InitFingerprintUnlock");
var btn = FindViewById(Resource.Id.fingerprintbtn);
@@ -225,7 +225,7 @@ namespace keepass2android
if (um == FingerprintUnlockMode.Disabled)
{
- return;
+ return false;
}
if (_fingerprintPermissionGranted)
@@ -254,7 +254,7 @@ namespace keepass2android
{
Kp2aLog.Log("trying Samsung Fingerprint API...failed.");
FindViewById(Resource.Id.fingerprintbtn).Visibility = ViewStates.Gone;
- return;
+ return false;
}
}
btn.Tag = GetString(Resource.String.fingerprint_unlock_hint);
@@ -264,6 +264,7 @@ namespace keepass2android
Kp2aLog.Log("successfully initialized fingerprint.");
btn.SetImageResource(Resource.Drawable.ic_fp_40px);
_fingerprintIdentifier.StartListening(this, this);
+ return true;
}
else
{
@@ -284,7 +285,7 @@ namespace keepass2android
_fingerprintIdentifier = null;
}
-
+ return false;
}
@@ -335,19 +336,29 @@ namespace keepass2android
CheckIfUnloaded();
- EditText pwd = (EditText) FindViewById(Resource.Id.QuickUnlock_password);
+
+ bool showKeyboard = ((!InitFingerprintUnlock()) || (Util.GetShowKeyboardDuringFingerprintUnlock(this)));
+
+ EditText pwd = (EditText)FindViewById(Resource.Id.QuickUnlock_password);
pwd.PostDelayed(() =>
- {
- InputMethodManager keyboard = (InputMethodManager) GetSystemService(Context.InputMethodService);
+ {
+ InputMethodManager keyboard = (InputMethodManager)GetSystemService(Context.InputMethodService);
+ if (showKeyboard)
keyboard.ShowSoftInput(pwd, 0);
- }, 50);
+ else
+ keyboard.HideSoftInputFromWindow(pwd.WindowToken, HideSoftInputFlags.ImplicitOnly);
+ }, 50);
+
+
- InitFingerprintUnlock();
+
}
+
+
protected override void OnPause()
{
base.OnPause();
diff --git a/src/keepass2android/Resources/layout/fingerprint_setup.xml b/src/keepass2android/Resources/layout/fingerprint_setup.xml
index 92a3ba40..dc0983eb 100644
--- a/src/keepass2android/Resources/layout/fingerprint_setup.xml
+++ b/src/keepass2android/Resources/layout/fingerprint_setup.xml
@@ -67,6 +67,12 @@
app:title_text="@string/enable_fingerprint_unlock"
android:background="?android:attr/selectableItemBackground" />
+
true
true
ViewDatabaseSecure
- true
+ ShowKeyboardWhileFingerprint_key
+ true
TrayTotp_SettingsField_key
TrayTotp_SeedField_key
TrayTotp_prefs_key
diff --git a/src/keepass2android/Resources/values/strings.xml b/src/keepass2android/Resources/values/strings.xml
index 2d04579c..12a38a7b 100644
--- a/src/keepass2android/Resources/values/strings.xml
+++ b/src/keepass2android/Resources/values/strings.xml
@@ -655,14 +655,21 @@
Use built-in keyboard
Use AutoFill service
Please enable the Keepass2Android service.
-
+ Show soft keyboard for password input when fingerprint scan is active.
Version 0.9.8c\n
* Fix for SSL vulnerability in Microsoft Live SDK (used when accessing files via OneDrive)\n
* Bug fix: Previous release contained two input methods (one crashing)\n
-
+
+ Version 1.0.0e\n
+ * fix for Fingerprint Unlock on older Samsung devices with Android 6\n
+ * add native support for x86 devices\n
+ * allow to hide softkeyboard during fingerprint scan\n
+ * build system update
+
+
Version 1.0.0\n
* Fingerprint Unlock (requires Android 6.0+ or a Samsung device)\n
* Added Auto-Fill service (requires Android 5.0+)\n
diff --git a/src/keepass2android/Utils/Util.cs b/src/keepass2android/Utils/Util.cs
index 37438043..e436c76c 100644
--- a/src/keepass2android/Utils/Util.cs
+++ b/src/keepass2android/Utils/Util.cs
@@ -490,6 +490,13 @@ namespace keepass2android
}
}
+ public static bool GetShowKeyboardDuringFingerprintUnlock(Context ctx)
+ {
+ return (PreferenceManager.GetDefaultSharedPreferences(ctx).GetBoolean(
+ ctx.GetString(Resource.String.ShowKeyboardWhileFingerprint_key), true));
+
+ }
+
public static void MoveBottomBarButtons(int btn1Id, int btn2Id, int bottomBarId, Activity context)
{
diff --git a/src/keepass2android/keepass2android.csproj b/src/keepass2android/keepass2android.csproj
index 0450ded2..ba5db5e4 100644
--- a/src/keepass2android/keepass2android.csproj
+++ b/src/keepass2android/keepass2android.csproj
@@ -48,7 +48,7 @@
4
False
False
- armeabi,armeabi-v7a,x86
+ armeabi,armeabi-v7a,x86,x86_64
@@ -58,18 +58,16 @@
RELEASE
System.Core%3b
True
-
-
SdkOnly
False
False
-
Xamarin
False
False
False
False
False
+ False
none
@@ -91,6 +89,7 @@
+