mirror of
https://github.com/bitwarden/android.git
synced 2024-12-26 02:48:29 +03:00
null checks on dialogs
This commit is contained in:
parent
aa38e79d08
commit
c6a40bac03
3 changed files with 12 additions and 28 deletions
33
src/Android/Resources/Resource.Designer.cs
generated
33
src/Android/Resources/Resource.Designer.cs
generated
|
@ -6506,17 +6506,17 @@ namespace Bit.Android
|
||||||
// aapt resource value: 0x7f0a0051
|
// aapt resource value: 0x7f0a0051
|
||||||
public const int ApplicationName = 2131361873;
|
public const int ApplicationName = 2131361873;
|
||||||
|
|
||||||
// aapt resource value: 0x7f0a00b2
|
// aapt resource value: 0x7f0a00ab
|
||||||
public const int AutoFillServiceDescription = 2131361970;
|
public const int AutoFillServiceDescription = 2131361963;
|
||||||
|
|
||||||
// aapt resource value: 0x7f0a00b1
|
// aapt resource value: 0x7f0a00aa
|
||||||
public const int AutoFillServiceSummary = 2131361969;
|
public const int AutoFillServiceSummary = 2131361962;
|
||||||
|
|
||||||
// aapt resource value: 0x7f0a0050
|
// aapt resource value: 0x7f0a0050
|
||||||
public const int Hello = 2131361872;
|
public const int Hello = 2131361872;
|
||||||
|
|
||||||
// aapt resource value: 0x7f0a00b3
|
// aapt resource value: 0x7f0a00ac
|
||||||
public const int MyVault = 2131361971;
|
public const int MyVault = 2131361964;
|
||||||
|
|
||||||
// aapt resource value: 0x7f0a0027
|
// aapt resource value: 0x7f0a0027
|
||||||
public const int abc_action_bar_home_description = 2131361831;
|
public const int abc_action_bar_home_description = 2131361831;
|
||||||
|
@ -6671,27 +6671,6 @@ namespace Bit.Android
|
||||||
// aapt resource value: 0x7f0a000f
|
// aapt resource value: 0x7f0a000f
|
||||||
public const int common_signin_button_text_long = 2131361807;
|
public const int common_signin_button_text_long = 2131361807;
|
||||||
|
|
||||||
// aapt resource value: 0x7f0a00ac
|
|
||||||
public const int default_web_client_id = 2131361964;
|
|
||||||
|
|
||||||
// aapt resource value: 0x7f0a00ad
|
|
||||||
public const int firebase_database_url = 2131361965;
|
|
||||||
|
|
||||||
// aapt resource value: 0x7f0a00aa
|
|
||||||
public const int gcm_defaultSenderId = 2131361962;
|
|
||||||
|
|
||||||
// aapt resource value: 0x7f0a00ae
|
|
||||||
public const int google_api_key = 2131361966;
|
|
||||||
|
|
||||||
// aapt resource value: 0x7f0a00ab
|
|
||||||
public const int google_app_id = 2131361963;
|
|
||||||
|
|
||||||
// aapt resource value: 0x7f0a00af
|
|
||||||
public const int google_crash_reporting_api_key = 2131361967;
|
|
||||||
|
|
||||||
// aapt resource value: 0x7f0a00b0
|
|
||||||
public const int google_storage_bucket = 2131361968;
|
|
||||||
|
|
||||||
// aapt resource value: 0x7f0a0052
|
// aapt resource value: 0x7f0a0052
|
||||||
public const int hockeyapp_crash_dialog_app_name_fallback = 2131361874;
|
public const int hockeyapp_crash_dialog_app_name_fallback = 2131361874;
|
||||||
|
|
||||||
|
|
|
@ -474,6 +474,11 @@ namespace Bit.Android.Services
|
||||||
public Task<string> DisplayPromptAync(string title = null, string description = null, string text = null)
|
public Task<string> DisplayPromptAync(string title = null, string description = null, string text = null)
|
||||||
{
|
{
|
||||||
var activity = (MainActivity)CurrentContext;
|
var activity = (MainActivity)CurrentContext;
|
||||||
|
if(activity == null)
|
||||||
|
{
|
||||||
|
return Task.FromResult<string>(null);
|
||||||
|
}
|
||||||
|
|
||||||
var alertBuilder = new AlertDialog.Builder(activity);
|
var alertBuilder = new AlertDialog.Builder(activity);
|
||||||
alertBuilder.SetTitle(title);
|
alertBuilder.SetTitle(title);
|
||||||
alertBuilder.SetMessage(description);
|
alertBuilder.SetMessage(description);
|
||||||
|
|
|
@ -405,7 +405,7 @@ namespace Bit.App.Utilities
|
||||||
{
|
{
|
||||||
selectedVal = exactingMatchVal;
|
selectedVal = exactingMatchVal;
|
||||||
}
|
}
|
||||||
else if(val != AppResources.Default)
|
else if(val != null && val != AppResources.Default)
|
||||||
{
|
{
|
||||||
selectedVal = UriMatchOptionsMap.ElementAt(Array.IndexOf(optionsArr, val) - 1).Key;
|
selectedVal = UriMatchOptionsMap.ElementAt(Array.IndexOf(optionsArr, val) - 1).Key;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue