1
0
mirror of https://github.com/bitwarden/mobile.git synced 2024-12-28 17:18:23 +01:00

autofill fixes

This commit is contained in:
Kyle Spearrin 2017-02-02 23:36:40 -05:00
parent 8c6d395d89
commit d067de086d
2 changed files with 20 additions and 1 deletions

View File

@ -33,6 +33,18 @@ namespace Bit.Android
base.OnDestroy(); base.OnDestroy();
} }
protected override void OnResume()
{
base.OnResume();
if(!Intent.HasExtra("uri"))
{
Finish();
return;
}
Intent.RemoveExtra("uri");
}
protected override void OnActivityResult(int requestCode, [GeneratedEnum] Result resultCode, Intent data) protected override void OnActivityResult(int requestCode, [GeneratedEnum] Result resultCode, Intent data)
{ {
base.OnActivityResult(requestCode, resultCode, data); base.OnActivityResult(requestCode, resultCode, data);
@ -79,6 +91,7 @@ namespace Bit.Android
_lastQueriedUri = callingIntent?.GetStringExtra("uri"); _lastQueriedUri = callingIntent?.GetStringExtra("uri");
if(_lastQueriedUri == null) if(_lastQueriedUri == null)
{ {
Finish();
return; return;
} }

View File

@ -55,7 +55,7 @@ namespace Bit.Android
var eventType = e.EventType; var eventType = e.EventType;
var packageName = e.PackageName; var packageName = e.PackageName;
if(packageName == SystemUiPackage || packageName == BitwardenPackage) if(packageName == SystemUiPackage)
{ {
return; return;
} }
@ -64,6 +64,12 @@ namespace Bit.Android
{ {
case EventTypes.WindowContentChanged: case EventTypes.WindowContentChanged:
case EventTypes.WindowStateChanged: case EventTypes.WindowStateChanged:
if(packageName == BitwardenPackage)
{
CancelNotification();
break;
}
var cancelNotification = true; var cancelNotification = true;
var root = RootInActiveWindow; var root = RootInActiveWindow;
var passwordNodes = GetWindowNodes(root, e, n => n.Password); var passwordNodes = GetWindowNodes(root, e, n => n.Password);