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

autofill intent fixes

This commit is contained in:
Kyle Spearrin
2017-02-16 22:22:19 -05:00
parent 5bce95a686
commit be9db2930f
4 changed files with 18 additions and 44 deletions

View File

@@ -28,22 +28,7 @@ namespace Bit.Android
protected override void OnCreate(Bundle bundle)
{
string uri = null;
if(!Intent.Flags.HasFlag(ActivityFlags.LaunchedFromHistory) && Intent.HasExtra("uri") && Intent.HasExtra("ts"))
{
var tsDiff = Java.Lang.JavaSystem.CurrentTimeMillis() - Intent.GetLongExtra("ts", 0);
if(tsDiff < 5000)
{
uri = Intent.GetStringExtra("uri");
}
// Attempt to clear intent for future
Intent.ReplaceExtras(new Bundle());
Intent.SetAction(string.Empty);
Intent.SetData(null);
Intent.SetFlags(0);
}
var uri = Intent.GetStringExtra("uri");
if(!Resolver.IsSet)
{
MainApplication.SetIoc(Application);
@@ -134,8 +119,7 @@ namespace Bit.Android
{
Parent.SetResult(Result.Ok, data);
}
MessagingCenter.Send(Xamarin.Forms.Application.Current, "SetMainPage");
Finish();
}