diff --git a/src/keepass2android/PasswordActivity.cs b/src/keepass2android/PasswordActivity.cs index f293ad9b..824b0ef4 100644 --- a/src/keepass2android/PasswordActivity.cs +++ b/src/keepass2android/PasswordActivity.cs @@ -546,6 +546,15 @@ namespace keepass2android base.OnCreate(savedInstanceState); _design.ApplyTheme(); + //use FlagSecure to make sure the last (revealed) character of the master password is not visible in recent apps + if (PreferenceManager.GetDefaultSharedPreferences(this).GetBoolean( + GetString(Resource.String.ViewDatabaseSecure_key), true)) + { + Window.SetFlags(WindowManagerFlags.Secure, WindowManagerFlags.Secure); + } + + + Intent i = Intent; //only load the AppTask if this is the "first" OnCreate (not because of kill/resume, i.e. savedInstanceState==null) diff --git a/src/keepass2android/QuickUnlock.cs b/src/keepass2android/QuickUnlock.cs index f1e38d3f..52df8697 100644 --- a/src/keepass2android/QuickUnlock.cs +++ b/src/keepass2android/QuickUnlock.cs @@ -48,6 +48,13 @@ namespace keepass2android base.OnCreate(bundle); _design.ApplyTheme(); + //use FlagSecure to make sure the last (revealed) character of the password is not visible in recent apps + if (PreferenceManager.GetDefaultSharedPreferences(this).GetBoolean( + GetString(Resource.String.ViewDatabaseSecure_key), true)) + { + Window.SetFlags(WindowManagerFlags.Secure, WindowManagerFlags.Secure); + } + _ioc = App.Kp2a.GetDb().Ioc; if (_ioc == null)