Fix dodgy bugs

Signed-off-by: alperozturk <alper_ozturk@proton.me>
This commit is contained in:
alperozturk 2024-04-04 10:26:27 +02:00
parent 684d9806be
commit 0f17882e3c
No known key found for this signature in database
GPG Key ID: 4E577DC593B59BDF
1 changed files with 6 additions and 8 deletions

View File

@ -113,6 +113,7 @@ import androidx.annotation.StringRes;
import androidx.appcompat.app.AlertDialog;
import androidx.appcompat.app.AppCompatDelegate;
import androidx.core.util.Pair;
import androidx.lifecycle.Lifecycle;
import androidx.lifecycle.LifecycleEventObserver;
import androidx.lifecycle.ProcessLifecycleOwner;
import androidx.multidex.MultiDexApplication;
@ -367,14 +368,11 @@ public class MainApp extends MultiDexApplication implements HasAndroidInjector {
}
private final LifecycleEventObserver lifecycleEventObserver = ((lifecycleOwner, event) -> {
switch (event) {
case ON_START -> {
Log_OC.d(TAG, "APP IN FOREGROUND");
}
case ON_STOP -> {
passCodeManager.setCanAskPin(true);
Log_OC.d(TAG, "APP IN BACKGROUND");
}
if (event == Lifecycle.Event.ON_START) {
Log_OC.d(TAG, "APP IN FOREGROUND");
} else if (event == Lifecycle.Event.ON_STOP) {
passCodeManager.setCanAskPin(true);
Log_OC.d(TAG, "APP IN BACKGROUND");
}
});