mirror of
https://github.com/bitwarden/mobile
synced 2025-12-05 23:53:33 +00:00
autofill wip
This commit is contained in:
@@ -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
|
||||
{
|
||||
|
||||
@@ -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)
|
||||
{
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user