diff --git a/README.md b/README.md index 2839f95ab..d740a0266 100644 --- a/README.md +++ b/README.md @@ -4,7 +4,7 @@ # Bitwarden Mobile Application -Get it on Google Play Get it on Google Play +Get it on Google Play Get it on F-Droid The Bitwarden mobile application is written in C# with Xamarin Android, Xamarin iOS, and Xamarin Forms. diff --git a/src/Android/Assets/bwi-font.ttf b/src/Android/Assets/bwi-font.ttf index 7c7afd4cd..f9b63283e 100644 Binary files a/src/Android/Assets/bwi-font.ttf and b/src/Android/Assets/bwi-font.ttf differ diff --git a/src/Android/Services/DeviceActionService.cs b/src/Android/Services/DeviceActionService.cs index 4f843eb55..dd1b8f1b6 100644 --- a/src/Android/Services/DeviceActionService.cs +++ b/src/Android/Services/DeviceActionService.cs @@ -3,7 +3,6 @@ using System.Threading.Tasks; using Android.App; using Android.Content; using Android.Content.PM; -using Android.Media; using Android.Nfc; using Android.OS; using Android.Provider; @@ -18,14 +17,9 @@ using Bit.App.Utilities; using Bit.App.Utilities.Prompts; using Bit.Core.Abstractions; using Bit.Core.Enums; -using Bit.Core.Utilities; using Bit.Droid.Utilities; using Plugin.CurrentActivity; using Xamarin.Forms.Platform.Android; -using static Android.Icu.Text.CaseMap; -using static Android.Renderscripts.ScriptGroup; -using static Android.Util.EventLogTags; -using static Bit.App.Pages.SettingsPageViewModel; namespace Bit.Droid.Services { @@ -267,6 +261,7 @@ namespace Bit.Droid.Services var result = new TaskCompletionSource(); + alertBuilder.SetOnCancelListener(new BasicDialogWithResultCancelListener(result)); alertBuilder.SetPositiveButton(config.OkButtonText ?? AppResources.Ok, listener: null); alertBuilder.SetNegativeButton(config.CancelButtonText ?? AppResources.Cancel, (sender, args) => result.TrySetResult(null)); if (!string.IsNullOrEmpty(config.ThirdButtonText)) @@ -614,4 +609,20 @@ namespace Bit.Droid.Services #pragma warning restore CS0618 // Type or member is obsolete } } + + class BasicDialogWithResultCancelListener : Java.Lang.Object, IDialogInterfaceOnCancelListener + { + private readonly TaskCompletionSource _taskCompletionSource; + + public BasicDialogWithResultCancelListener(TaskCompletionSource taskCompletionSource) + { + _taskCompletionSource = taskCompletionSource; + } + + public void OnCancel(IDialogInterface dialog) + { + _taskCompletionSource?.TrySetResult(null); + dialog?.Dismiss(); + } + } } diff --git a/src/App/Controls/CipherViewCell/CipherViewCellViewModel.cs b/src/App/Controls/CipherViewCell/CipherViewCellViewModel.cs index ea21df7dc..b5150b003 100644 --- a/src/App/Controls/CipherViewCell/CipherViewCellViewModel.cs +++ b/src/App/Controls/CipherViewCell/CipherViewCellViewModel.cs @@ -31,7 +31,7 @@ namespace Bit.App.Controls public bool ShowIconImage { get => WebsiteIconsEnabled - && !string.IsNullOrWhiteSpace(Cipher.Login?.Uri) + && !string.IsNullOrWhiteSpace(Cipher.LaunchUri) && IconImageSource != null; } @@ -41,7 +41,7 @@ namespace Bit.App.Controls { if (_iconImageSource == string.Empty) // default value since icon source can return null { - _iconImageSource = IconImageHelper.GetLoginIconImage(Cipher); + _iconImageSource = IconImageHelper.GetIconImage(Cipher); } return _iconImageSource; } diff --git a/src/App/Pages/Vault/BaseCipherViewModel.cs b/src/App/Pages/Vault/BaseCipherViewModel.cs index 871d8aa24..9cbfe7e83 100644 --- a/src/App/Pages/Vault/BaseCipherViewModel.cs +++ b/src/App/Pages/Vault/BaseCipherViewModel.cs @@ -37,6 +37,8 @@ namespace Bit.App.Pages set => SetProperty(ref _cipher, value, additionalPropertyNames: AdditionalPropertiesToRaiseOnCipherChanged); } + public string CreationDate => string.Format(AppResources.CreatedX, Cipher.CreationDate.ToShortDateString()); + public AsyncCommand CheckPasswordCommand { get; } protected async Task CheckPasswordAsync() diff --git a/src/App/Pages/Vault/CipherAddEditPage.xaml b/src/App/Pages/Vault/CipherAddEditPage.xaml index 552a5ac02..453da9146 100644 --- a/src/App/Pages/Vault/CipherAddEditPage.xaml +++ b/src/App/Pages/Vault/CipherAddEditPage.xaml @@ -223,6 +223,17 @@ AutomationId="RegeneratePasswordButton" /> +