mirror of
https://github.com/bitwarden/android.git
synced 2024-12-20 08:12:26 +03:00
autofill wip
This commit is contained in:
parent
36c6c5a35e
commit
53774735d4
3 changed files with 12 additions and 1 deletions
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue