Finish on screen off when using biometrics authentication

This commit is contained in:
M66B 2019-07-11 17:54:52 +02:00
parent ba699002b0
commit 21b66b165a
1 changed files with 6 additions and 1 deletions

View File

@ -147,7 +147,12 @@ abstract class ActivityBase extends AppCompatActivity implements SharedPreferenc
if (pm != null && !pm.isInteractive()) {
Log.i("Stop with screen off");
Helper.clearAuthentication(this);
SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(this);
boolean biometrics = prefs.getBoolean("biometrics", false);
if (biometrics) {
Helper.clearAuthentication(this);
finish();
}
}
}