Move unlock-check from onCreate to onStart (to provide security even if multiple singlenotewidgets are clicked after another)

This commit is contained in:
Christoph Loy 2020-03-02 19:29:02 +01:00
parent 8d3e9c223b
commit dd36786a81
No known key found for this signature in database
GPG key ID: 9179970615A6E7C9

View file

@ -26,10 +26,6 @@ public abstract class LockedActivity extends AppCompatActivity {
super.onCreate(savedInstanceState);
Thread.currentThread().setUncaughtExceptionHandler(new ExceptionHandler(this));
if (isTaskRoot()) {
askToUnlock();
}
}
@Override
@ -37,6 +33,16 @@ public abstract class LockedActivity extends AppCompatActivity {
super.onResume();
if (!isTaskRoot()) {
// TODO - Evaluate if this is really needed
askToUnlock();
}
}
@Override
protected void onStart() {
super.onStart();
if (isTaskRoot()) {
askToUnlock();
}
}