mirror of
https://github.com/bitwarden/android.git
synced 2024-12-26 02:48:29 +03:00
Catch additional exception types when validating intents (#2618)
This commit is contained in:
parent
1f20f70d13
commit
9adc4d3080
1 changed files with 7 additions and 1 deletions
|
@ -1,5 +1,6 @@
|
||||||
using Android.Content;
|
using Android.Content;
|
||||||
using Android.OS;
|
using Android.OS;
|
||||||
|
using Java.Lang;
|
||||||
|
|
||||||
namespace Bit.Droid.Utilities
|
namespace Bit.Droid.Utilities
|
||||||
{
|
{
|
||||||
|
@ -13,7 +14,12 @@ namespace Bit.Droid.Utilities
|
||||||
// Note: getting the bundle like this will cause to call unparcel() internally
|
// Note: getting the bundle like this will cause to call unparcel() internally
|
||||||
var b = intent?.Extras?.GetBundle("trashstringwhichhasnousebuttocheckunparcel");
|
var b = intent?.Extras?.GetBundle("trashstringwhichhasnousebuttocheckunparcel");
|
||||||
}
|
}
|
||||||
catch (BadParcelableException)
|
catch (Exception ex) when
|
||||||
|
(
|
||||||
|
ex is BadParcelableException ||
|
||||||
|
ex is ClassNotFoundException ||
|
||||||
|
ex is RuntimeException
|
||||||
|
)
|
||||||
{
|
{
|
||||||
intent.ReplaceExtras((Bundle)null);
|
intent.ReplaceExtras((Bundle)null);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue