mirror of
https://github.com/bitwarden/android.git
synced 2024-12-25 10:28:28 +03:00
use bio strings for native android bio
This commit is contained in:
parent
4b989b01e9
commit
f951fea555
6 changed files with 48 additions and 6 deletions
|
@ -378,7 +378,7 @@ namespace Bit.Droid.Services
|
|||
{
|
||||
if(string.IsNullOrWhiteSpace(text))
|
||||
{
|
||||
text = AppResources.BiometricDirection;
|
||||
text = AppResources.BiometricsDirection;
|
||||
}
|
||||
|
||||
var activity = (MainActivity)CrossCurrentActivity.Current.Activity;
|
||||
|
|
|
@ -127,8 +127,18 @@ namespace Bit.App.Pages
|
|||
if(FingerprintLock)
|
||||
{
|
||||
var supportsFace = await _deviceActionService.SupportsFaceBiometricAsync();
|
||||
FingerprintButtonText = supportsFace ? AppResources.UseFaceIDToUnlock :
|
||||
AppResources.UseFingerprintToUnlock;
|
||||
if(Device.RuntimePlatform == Device.iOS && supportsFace)
|
||||
{
|
||||
FingerprintButtonText = AppResources.UseFaceIDToUnlock;
|
||||
}
|
||||
else if(Device.RuntimePlatform == Device.Android && _deviceActionService.UseNativeBiometric())
|
||||
{
|
||||
FingerprintButtonText = AppResources.UseBiometricsToUnlock;
|
||||
}
|
||||
else
|
||||
{
|
||||
FingerprintButtonText = AppResources.UseFingerprintToUnlock;
|
||||
}
|
||||
if(autoPromptFingerprint)
|
||||
{
|
||||
var tasks = Task.Run(async () =>
|
||||
|
|
|
@ -145,6 +145,10 @@ namespace Bit.App.Pages
|
|||
var supportsFace = await _deviceActionService.SupportsFaceBiometricAsync();
|
||||
fingerprintName = supportsFace ? AppResources.FaceID : AppResources.TouchID;
|
||||
}
|
||||
else if(Device.RuntimePlatform == Device.Android && _deviceActionService.UseNativeBiometric())
|
||||
{
|
||||
fingerprintName = AppResources.Biometrics;
|
||||
}
|
||||
if(item.Name == string.Format(AppResources.UnlockWith, fingerprintName))
|
||||
{
|
||||
await _vm.UpdateFingerprintAsync();
|
||||
|
|
|
@ -331,6 +331,10 @@ namespace Bit.App.Pages
|
|||
fingerprintName = _deviceActionService.SupportsFaceBiometric() ? AppResources.FaceID :
|
||||
AppResources.TouchID;
|
||||
}
|
||||
else if(Device.RuntimePlatform == Device.Android && _deviceActionService.UseNativeBiometric())
|
||||
{
|
||||
fingerprintName = AppResources.Biometrics;
|
||||
}
|
||||
var item = new SettingsPageListItem
|
||||
{
|
||||
Name = string.Format(AppResources.UnlockWith, fingerprintName),
|
||||
|
|
22
src/App/Resources/AppResources.Designer.cs
generated
22
src/App/Resources/AppResources.Designer.cs
generated
|
@ -537,12 +537,21 @@ namespace Bit.App.Resources {
|
|||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Biometrics.
|
||||
/// </summary>
|
||||
public static string Biometrics {
|
||||
get {
|
||||
return ResourceManager.GetString("Biometrics", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Use biometrics to verify..
|
||||
/// </summary>
|
||||
public static string BiometricDirection {
|
||||
public static string BiometricsDirection {
|
||||
get {
|
||||
return ResourceManager.GetString("BiometricDirection", resourceCulture);
|
||||
return ResourceManager.GetString("BiometricsDirection", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -3831,6 +3840,15 @@ namespace Bit.App.Resources {
|
|||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Use Biometrics To Unlock.
|
||||
/// </summary>
|
||||
public static string UseBiometricsToUnlock {
|
||||
get {
|
||||
return ResourceManager.GetString("UseBiometricsToUnlock", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Use Face ID To Unlock.
|
||||
/// </summary>
|
||||
|
|
|
@ -1578,7 +1578,13 @@
|
|||
<data name="LoginExpired" xml:space="preserve">
|
||||
<value>Your login session has expired.</value>
|
||||
</data>
|
||||
<data name="BiometricDirection" xml:space="preserve">
|
||||
<data name="BiometricsDirection" xml:space="preserve">
|
||||
<value>Use biometrics to verify.</value>
|
||||
</data>
|
||||
<data name="Biometrics" xml:space="preserve">
|
||||
<value>Biometrics</value>
|
||||
</data>
|
||||
<data name="UseBiometricsToUnlock" xml:space="preserve">
|
||||
<value>Use Biometrics To Unlock</value>
|
||||
</data>
|
||||
</root>
|
Loading…
Reference in a new issue