Allow showing passwords when biometric / PIN authentication is enabled only

This commit is contained in:
M66B
2020-02-26 12:13:34 +01:00
parent 4ccf83e742
commit 7708165e8e
4 changed files with 23 additions and 3 deletions

View File

@@ -378,6 +378,13 @@ public class Helper {
return BuildConfig.PLAY_STORE_RELEASE;
}
static boolean isSecure(Context context) {
SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(context);
boolean biometrics = prefs.getBoolean("biometrics", false);
String pin = prefs.getString("pin", null);
return (biometrics || !TextUtils.isEmpty(pin));
}
// View
static Intent getChooser(Context context, Intent intent) {