diff --git a/app/src/main/java/org/schabi/newpipe/error/AppLifecycleObserver.kt b/app/src/main/java/org/schabi/newpipe/error/AppLifecycleObserver.kt index 1d5e848649c..25f63a43769 100644 --- a/app/src/main/java/org/schabi/newpipe/error/AppLifecycleObserver.kt +++ b/app/src/main/java/org/schabi/newpipe/error/AppLifecycleObserver.kt @@ -31,6 +31,11 @@ object AppLifecycleObserver : DefaultLifecycleObserver { Log.d(TAG, "App moved to background: ") } + + /** + * Returns if the app is currently in the background + * or in case of a crash the state when the crash happened + */ fun isInBackground(): Boolean { return sharedPreferences.getBoolean(KEY_IS_IN_BACKGROUND, true) }