autofill wip

This commit is contained in:
Kyle Spearrin 2017-01-30 23:33:02 -05:00
parent 36c6c5a35e
commit 53774735d4
3 changed files with 12 additions and 1 deletions

View File

@ -8,7 +8,7 @@ namespace Bit.Android
{
[Activity(Label = "bitwarden",
Icon = "@drawable/icon",
LaunchMode = global::Android.Content.PM.LaunchMode.SingleInstance,
LaunchMode = global::Android.Content.PM.LaunchMode.SingleTask,
WindowSoftInputMode = SoftInput.StateHidden)]
public class AutofillActivity : Activity
{

View File

@ -21,6 +21,7 @@ namespace Bit.Android
[Activity(Label = "bitwarden",
Icon = "@drawable/icon",
ConfigurationChanges = ConfigChanges.ScreenSize | ConfigChanges.Orientation,
LaunchMode = LaunchMode.SingleTask,
WindowSoftInputMode = SoftInput.StateHidden)]
public class MainActivity : FormsAppCompatActivity
{
@ -88,6 +89,7 @@ namespace Bit.Android
private void ReturnCredentials(VaultListPageModel.Login login)
{
App.App.WasFromAutofillService = true;
Intent data = new Intent();
if(login == null)
{

View File

@ -31,6 +31,8 @@ namespace Bit.App
private readonly IGoogleAnalyticsService _googleAnalyticsService;
private readonly ILocalizeService _localizeService;
public static bool WasFromAutofillService { get; set; } = false;
public App(
string uri,
IAuthService authService,
@ -59,6 +61,7 @@ namespace Bit.App
SetCulture();
SetStyles();
WasFromAutofillService = !string.IsNullOrWhiteSpace(_uri);
if(authService.IsAuthenticated && _uri != null)
{
MainPage = new ExtendedNavigationPage(new VaultAutofillListLoginsPage(_uri));
@ -123,6 +126,12 @@ namespace Bit.App
if(Device.OS == TargetPlatform.Android)
{
if(WasFromAutofillService)
{
WasFromAutofillService = false;
MainPage = new MainPage();
}
await CheckLockAsync(false);
}