1
0
mirror of https://github.com/bitwarden/mobile synced 2025-12-15 07:43:37 +00:00

launch for main activity and catch exceptions

This commit is contained in:
Kyle Spearrin
2017-06-23 23:21:39 -04:00
parent 573ff15925
commit 12da6fbd18
3 changed files with 42 additions and 21 deletions

View File

@@ -15,6 +15,7 @@ using Xamarin.Forms;
using System.Threading.Tasks;
using Bit.App.Models.Page;
using Bit.App;
using Android.Runtime;
namespace Bit.Android
{
@@ -29,6 +30,8 @@ namespace Bit.Android
protected override void OnCreate(Bundle bundle)
{
AndroidEnvironment.UnhandledExceptionRaiser += AndroidEnvironment_UnhandledExceptionRaiser;
var uri = Intent.GetStringExtra("uri");
if(!Resolver.IsSet)
{
@@ -104,6 +107,12 @@ namespace Bit.Android
});
}
private void AndroidEnvironment_UnhandledExceptionRaiser(object sender, RaiseThrowableEventArgs e)
{
var message = Utilities.AppendExceptionToMessage("", e.Exception);
Utilities.SendCrashEmail(this, e.Exception, true);
}
private void ReturnCredentials(VaultListPageModel.Login login)
{
Intent data = new Intent();