1
0
mirror of https://github.com/bitwarden/mobile synced 2025-12-25 04:33:36 +00:00

Clear intent from autofill. Background app when back button on lock page.

This commit is contained in:
Kyle Spearrin
2017-02-09 18:12:34 -05:00
parent 99e78092ed
commit e970ca49e8
6 changed files with 57 additions and 61 deletions

View File

@@ -31,7 +31,12 @@ namespace Bit.Android
var uri = Intent.Flags.HasFlag(ActivityFlags.LaunchedFromHistory) ? null : Intent.GetStringExtra("uri");
if(Intent.HasExtra("uri"))
{
// Clear intent for future. ref: http://stackoverflow.com/a/29947867/1090359
Intent.RemoveExtra("uri");
Intent.ReplaceExtras(new Bundle());
Intent.SetAction(string.Empty);
Intent.SetData(null);
Intent.SetFlags(0);
}
if(uri != null && !Resolver.IsSet)
@@ -95,6 +100,11 @@ namespace Bit.Android
{
ReturnCredentials(args);
});
MessagingCenter.Subscribe<Xamarin.Forms.Application>(Xamarin.Forms.Application.Current, "BackgroundApp", (sender) =>
{
MoveTaskToBack(true);
});
}
private void ReturnCredentials(VaultListPageModel.Login login)