version bump. all unhandled crash report email

This commit is contained in:
Kyle Spearrin 2017-06-08 12:44:16 -04:00
parent c9b6df846e
commit 21f3755e44
3 changed files with 30 additions and 19 deletions

View file

@ -38,12 +38,31 @@ namespace Bit.Android
public MainApplication(IntPtr handle, JniHandleOwnership transer) public MainApplication(IntPtr handle, JniHandleOwnership transer)
: base(handle, transer) : base(handle, transer)
{ {
AndroidEnvironment.UnhandledExceptionRaiser += AndroidEnvironment_UnhandledExceptionRaiser;
if(!Resolver.IsSet) if(!Resolver.IsSet)
{ {
SetIoc(this); SetIoc(this);
} }
} }
private void AndroidEnvironment_UnhandledExceptionRaiser(object sender, RaiseThrowableEventArgs e)
{
var message = AppendExceptionToMessage("", e.Exception);
Utilities.SendCrashEmail(message, false);
}
private string AppendExceptionToMessage(string message, Exception ex)
{
message += ("\n\n" + ex.Message + "\n\n" + ex.StackTrace);
if(ex.InnerException != null)
{
return AppendExceptionToMessage(message, ex.InnerException);
}
return message;
}
public override void OnCreate() public override void OnCreate()
{ {
base.OnCreate(); base.OnCreate();

View file

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.x8bit.bitwarden" android:versionName="1.6.2" android:installLocation="auto" android:versionCode="502"> <manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.x8bit.bitwarden" android:versionName="1.6.3" android:installLocation="auto" android:versionCode="502">
<uses-sdk android:minSdkVersion="19" android:targetSdkVersion="23" /> <uses-sdk android:minSdkVersion="19" android:targetSdkVersion="23" />
<uses-permission android:name="android.permission.INTERNET" /> <uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.USE_FINGERPRINT" /> <uses-permission android:name="android.permission.USE_FINGERPRINT" />

View file

@ -29,8 +29,6 @@ namespace Bit.Android.Services
private readonly ISecureStorageService _oldKeyStorageService; private readonly ISecureStorageService _oldKeyStorageService;
public KeyStoreBackedStorageService(ISettings settings) public KeyStoreBackedStorageService(ISettings settings)
{
try
{ {
_oldAndroid = Build.VERSION.SdkInt < BuildVersionCodes.M; _oldAndroid = Build.VERSION.SdkInt < BuildVersionCodes.M;
_rsaMode = _oldAndroid ? "RSA/ECB/PKCS1Padding" : "RSA/ECB/OAEPWithSHA-1AndMGF1Padding"; _rsaMode = _oldAndroid ? "RSA/ECB/PKCS1Padding" : "RSA/ECB/OAEPWithSHA-1AndMGF1Padding";
@ -44,12 +42,6 @@ namespace Bit.Android.Services
GenerateRsaKey(); GenerateRsaKey();
GenerateAesKey(); GenerateAesKey();
} }
catch(Exception e)
{
Utilities.SendCrashEmail(e);
throw;
}
}
public bool Contains(string key) public bool Contains(string key)
{ {