mirror of
https://github.com/bitwarden/android.git
synced 2024-12-25 18:38:27 +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))
|
if(string.IsNullOrWhiteSpace(text))
|
||||||
{
|
{
|
||||||
text = AppResources.BiometricDirection;
|
text = AppResources.BiometricsDirection;
|
||||||
}
|
}
|
||||||
|
|
||||||
var activity = (MainActivity)CrossCurrentActivity.Current.Activity;
|
var activity = (MainActivity)CrossCurrentActivity.Current.Activity;
|
||||||
|
|
|
@ -127,8 +127,18 @@ namespace Bit.App.Pages
|
||||||
if(FingerprintLock)
|
if(FingerprintLock)
|
||||||
{
|
{
|
||||||
var supportsFace = await _deviceActionService.SupportsFaceBiometricAsync();
|
var supportsFace = await _deviceActionService.SupportsFaceBiometricAsync();
|
||||||
FingerprintButtonText = supportsFace ? AppResources.UseFaceIDToUnlock :
|
if(Device.RuntimePlatform == Device.iOS && supportsFace)
|
||||||
AppResources.UseFingerprintToUnlock;
|
{
|
||||||
|
FingerprintButtonText = AppResources.UseFaceIDToUnlock;
|
||||||
|
}
|
||||||
|
else if(Device.RuntimePlatform == Device.Android && _deviceActionService.UseNativeBiometric())
|
||||||
|
{
|
||||||
|
FingerprintButtonText = AppResources.UseBiometricsToUnlock;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
FingerprintButtonText = AppResources.UseFingerprintToUnlock;
|
||||||
|
}
|
||||||
if(autoPromptFingerprint)
|
if(autoPromptFingerprint)
|
||||||
{
|
{
|
||||||
var tasks = Task.Run(async () =>
|
var tasks = Task.Run(async () =>
|
||||||
|
|
|
@ -145,6 +145,10 @@ namespace Bit.App.Pages
|
||||||
var supportsFace = await _deviceActionService.SupportsFaceBiometricAsync();
|
var supportsFace = await _deviceActionService.SupportsFaceBiometricAsync();
|
||||||
fingerprintName = supportsFace ? AppResources.FaceID : AppResources.TouchID;
|
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))
|
if(item.Name == string.Format(AppResources.UnlockWith, fingerprintName))
|
||||||
{
|
{
|
||||||
await _vm.UpdateFingerprintAsync();
|
await _vm.UpdateFingerprintAsync();
|
||||||
|
|
|
@ -331,6 +331,10 @@ namespace Bit.App.Pages
|
||||||
fingerprintName = _deviceActionService.SupportsFaceBiometric() ? AppResources.FaceID :
|
fingerprintName = _deviceActionService.SupportsFaceBiometric() ? AppResources.FaceID :
|
||||||
AppResources.TouchID;
|
AppResources.TouchID;
|
||||||
}
|
}
|
||||||
|
else if(Device.RuntimePlatform == Device.Android && _deviceActionService.UseNativeBiometric())
|
||||||
|
{
|
||||||
|
fingerprintName = AppResources.Biometrics;
|
||||||
|
}
|
||||||
var item = new SettingsPageListItem
|
var item = new SettingsPageListItem
|
||||||
{
|
{
|
||||||
Name = string.Format(AppResources.UnlockWith, fingerprintName),
|
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>
|
/// <summary>
|
||||||
/// Looks up a localized string similar to Use biometrics to verify..
|
/// Looks up a localized string similar to Use biometrics to verify..
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public static string BiometricDirection {
|
public static string BiometricsDirection {
|
||||||
get {
|
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>
|
/// <summary>
|
||||||
/// Looks up a localized string similar to Use Face ID To Unlock.
|
/// Looks up a localized string similar to Use Face ID To Unlock.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|
|
@ -1578,7 +1578,13 @@
|
||||||
<data name="LoginExpired" xml:space="preserve">
|
<data name="LoginExpired" xml:space="preserve">
|
||||||
<value>Your login session has expired.</value>
|
<value>Your login session has expired.</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="BiometricDirection" xml:space="preserve">
|
<data name="BiometricsDirection" xml:space="preserve">
|
||||||
<value>Use biometrics to verify.</value>
|
<value>Use biometrics to verify.</value>
|
||||||
</data>
|
</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>
|
</root>
|
Loading…
Reference in a new issue