add flag secure for QuickUnlock and PasswordActivity (don't reveal last character of passwords)

This commit is contained in:
Philipp Crocoll 2015-02-11 08:41:59 +01:00
parent c9863b3178
commit 99a56f8e52
2 changed files with 16 additions and 0 deletions

View File

@ -546,6 +546,15 @@ namespace keepass2android
base.OnCreate(savedInstanceState); base.OnCreate(savedInstanceState);
_design.ApplyTheme(); _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; Intent i = Intent;
//only load the AppTask if this is the "first" OnCreate (not because of kill/resume, i.e. savedInstanceState==null) //only load the AppTask if this is the "first" OnCreate (not because of kill/resume, i.e. savedInstanceState==null)

View File

@ -48,6 +48,13 @@ namespace keepass2android
base.OnCreate(bundle); base.OnCreate(bundle);
_design.ApplyTheme(); _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; _ioc = App.Kp2a.GetDb().Ioc;
if (_ioc == null) if (_ioc == null)