diff --git a/android-client/web/app.html b/android-client/web/app.html index 232da0d..a28d7ab 100644 --- a/android-client/web/app.html +++ b/android-client/web/app.html @@ -631,11 +631,13 @@ "Diagnostics" au-dessus de rien. -->

Copy and search

+ Hide Vault after copying (may show the home screen) -
Copy, and you are back in the browser or app you came - from, ready to paste. Come back and the search is ready to type.
+
To jump back to the app you came from, use Android's own + gesture: swipe along the bottom bar, or tap the recent-apps button twice. + After a copy the vault stays open for 2 minutes in the background, time + to paste the username and come back for the password.

Diagnostics

diff --git a/mainApk.pas b/mainApk.pas index 8ba55d5..158ecc8 100644 --- a/mainApk.pas +++ b/mainApk.pas @@ -87,6 +87,10 @@ const // pour aller coller un mot de passe ailleurs et revenir ; trop court pour // qu'un telephone repose ouvert. BACKGROUND_GRACE_SECONDS = 30; + // APRES UNE COPIE, plus long : on part coller l'identifiant puis on revient + // chercher le mot de passe, et 30 s n'y suffisaient pas - le coffre se + // reverrouillait au milieu du geste. + COPY_GRACE_SECONDS = 120; // Duree minimale entre deux rafraichissements de fond. // @@ -157,6 +161,9 @@ type // Reglages d'usage (Settings -> Copy and search), vrais par defaut. Rien de // secret : un petit fichier en clair dans le dossier prive de l'app. FUiBackAfterCopy, FUiKbdOnSearch: Boolean; + // Une copie vient d'etre faite : le prochain passage en arriere-plan a + // droit au delai long (COPY_GRACE_SECONDS). + FCopyGrace: Boolean; // La cle du verrouillage d'ecran est morte (schema retire ou reinitialise) : // on ouvre la copie de secours, scellee sous le mot de passe. FRecover: Boolean; @@ -1687,6 +1694,12 @@ begin end); end; +function GraceSeconds(AAfterCopy: Boolean): Integer; +begin + if AAfterCopy then Result := COPY_GRACE_SECONDS + else Result := BACKGROUND_GRACE_SECONDS; +end; + function UiPrefsPath: string; begin Result := System.IOUtils.TPath.Combine(System.IOUtils.TPath.GetHomePath, 'ui-prefs.txt'); @@ -1696,12 +1709,15 @@ procedure TForm8.LoadUiPrefs; var LText: string; begin - FUiBackAfterCopy := True; + // Retour automatique DECOCHE par defaut : Android ne laisse pas choisir + // l'app qui passe devant, et selon la facon dont Vault a ete ouvert c'est + // l'ecran d'accueil qui revient, pas l'app d'avant. + FUiBackAfterCopy := False; FUiKbdOnSearch := True; try if not TFile.Exists(UiPrefsPath) then Exit; LText := TFile.ReadAllText(UiPrefsPath); - FUiBackAfterCopy := not LText.Contains('back=0'); + FUiBackAfterCopy := LText.Contains('back=1'); FUiKbdOnSearch := not LText.Contains('kbd=0'); except // Illisible : on garde les valeurs par defaut. @@ -3069,6 +3085,7 @@ begin // l'application. if not CopySensitive(AText) then Exit; FCopied := AText; + FCopyGrace := True; // Reprogramme depuis zero : deux copies successives donnent au second // contenu son delai complet, pas le reste de celui du premier. FClipTimer.Enabled := False; @@ -3137,7 +3154,8 @@ begin if FVault.Count > 0 then begin if (FBackgroundAt > 0) and - (SecondsBetween(Now, FBackgroundAt) >= BACKGROUND_GRACE_SECONDS) then + (SecondsBetween(Now, FBackgroundAt) >= + GraceSeconds(FCopyGrace)) then LockVault else // Retour a temps : on rend l'ecran quitte, pas un autre. La page a @@ -3153,6 +3171,7 @@ begin FWeb.Visible := True; end; FBackgroundAt := 0; + FCopyGrace := False; // RETOUR DANS VAULT = on vient chercher un mot de passe : la recherche // est prete, texte precedent selectionne pour etre remplace. if FUiKbdOnSearch and (FWebView = 'list') and (FPlain <> '') then