mirror of
https://github.com/moparisthebest/keepass2android
synced 2024-11-15 14:05:03 -05:00
add flag secure for QuickUnlock and PasswordActivity (don't reveal last character of passwords)
This commit is contained in:
parent
c9863b3178
commit
99a56f8e52
@ -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)
|
||||||
|
@ -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)
|
||||||
|
Loading…
Reference in New Issue
Block a user