From 0f0d610465af1350bae931611d4838a4ba24ebf7 Mon Sep 17 00:00:00 2001 From: Thompson3142 Date: Thu, 12 Dec 2024 23:06:13 +0100 Subject: [PATCH] Added docs for isInBackground --- .../java/org/schabi/newpipe/error/AppLifecycleObserver.kt | 5 +++++ 1 file changed, 5 insertions(+) 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) }