Skip to content

Commit 0f0d610

Browse files
committed
Added docs for isInBackground
1 parent 9ebae13 commit 0f0d610

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

app/src/main/java/org/schabi/newpipe/error/AppLifecycleObserver.kt

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,11 @@ object AppLifecycleObserver : DefaultLifecycleObserver {
3131
Log.d(TAG, "App moved to background: ")
3232
}
3333

34+
35+
/**
36+
* Returns if the app is currently in the background
37+
* or in case of a crash the state when the crash happened
38+
*/
3439
fun isInBackground(): Boolean {
3540
return sharedPreferences.getBoolean(KEY_IS_IN_BACKGROUND, true)
3641
}

0 commit comments

Comments
 (0)