IMPROVED UNDERSCREEN FINGERPRINT, ISSUE #831
Improved underscreen fingerprint as request in issue #831 by giving the users the ability to disable the sensor in the PasswordActivity. Now pressing the fingerprint icon opens up a dialog that has the option to enable/disable the sensor. I added two new strings to the resources (enable sensor - disable sensor) and already translated them to italian.
This commit is contained in:
@@ -904,10 +904,28 @@ namespace keepass2android
|
||||
AlertDialog.Builder b = new AlertDialog.Builder(this);
|
||||
b.SetTitle(Resource.String.fingerprint_prefs);
|
||||
b.SetMessage(btn.Tag.ToString());
|
||||
b.SetPositiveButton(Android.Resource.String.Ok, (o, eventArgs) => ((Dialog)o).Dismiss());
|
||||
|
||||
if (_fingerprintDec != null)
|
||||
{
|
||||
b.SetPositiveButton(Android.Resource.String.Ok, (o, eventArgs) => ((Dialog)o).Dismiss());
|
||||
b.SetNegativeButton(Resource.String.disable_sensor, (senderAlert, alertArgs) =>
|
||||
{
|
||||
btn.SetImageResource(Resource.Drawable.ic_fingerprint_error);
|
||||
_fingerprintDec?.StopListening();
|
||||
_fingerprintDec = null;
|
||||
});
|
||||
}
|
||||
else
|
||||
{
|
||||
b.SetPositiveButton(Android.Resource.String.Ok, (o, eventArgs) => ((Dialog)o).Dismiss());
|
||||
b.SetNegativeButton(Resource.String.enable_sensor, (senderAlert, alertArgs) =>
|
||||
{
|
||||
InitFingerprintUnlock();
|
||||
});
|
||||
}
|
||||
b.Show();
|
||||
};
|
||||
_fingerprintPermissionGranted = true;
|
||||
_fingerprintPermissionGranted = true;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -919,7 +937,7 @@ namespace keepass2android
|
||||
edit.Commit();
|
||||
}
|
||||
|
||||
|
||||
|
||||
public void OnFingerprintError(string message)
|
||||
{
|
||||
var btn = FindViewById<ImageButton>(Resource.Id.fingerprintbtn);
|
||||
@@ -999,7 +1017,7 @@ namespace keepass2android
|
||||
|
||||
if (_appnameclickCount == 7)
|
||||
{
|
||||
throw new Exception("this is an easter egg crash (to test uncaught exceptions.");
|
||||
throw new Exception("this is an easter egg crash (to test uncaught exceptions.)");
|
||||
}
|
||||
|
||||
|
||||
@@ -1112,7 +1130,7 @@ namespace keepass2android
|
||||
|
||||
var changeDbButton = FindViewById<Button>(Resource.Id.change_db);
|
||||
string label = changeDbButton.Text;
|
||||
if (label.EndsWith("<22>"))
|
||||
if (label.EndsWith("<22>"))
|
||||
changeDbButton.Text = label.Substring(0, label.Length - 1);
|
||||
changeDbButton.Click += (sender, args) => GoToFileSelectActivity();
|
||||
|
||||
|
||||
@@ -62,6 +62,8 @@
|
||||
<string name="brackets">Parentesi</string>
|
||||
<string name="cancel">Annulla</string>
|
||||
<string name="Ok">Ok</string>
|
||||
<string name="disable_sensor">Disabilita sensore</string>
|
||||
<string name="enable_sensor">Abilita sensore</string>
|
||||
<string name="ClearClipboard">Appunti eliminati.</string>
|
||||
<string name="clipboard_timeout">Scadenza appunti</string>
|
||||
<string name="clipboard_timeout_summary">Durata degli appunti dopo la copia di nome utente o password</string>
|
||||
|
||||
@@ -67,10 +67,12 @@
|
||||
<string name="brackets">Brackets</string>
|
||||
<string name="cancel">Cancel</string>
|
||||
<string name="Ok">Ok</string>
|
||||
<string name="disable_sensor">Disable sensor</string>
|
||||
<string name="enable_sensor">Enable sensor</string>
|
||||
<string name="ClearClipboard">Clipboard cleared.</string>
|
||||
|
||||
|
||||
|
||||
|
||||
<string name="clipboard_timeout">Clipboard timeout</string>
|
||||
<string name="clipboard_timeout_summary">Time before clearing clipboard after copying username or password</string>
|
||||
<string name="copy_username">Select to copy username to clipboard</string>
|
||||
|
||||
Reference in New Issue
Block a user