1
0
mirror of https://github.com/TeamNewPipe/NewPipe synced 2025-01-22 23:17:00 +00:00

Added docs for isInBackground

This commit is contained in:
Thompson3142 2024-12-12 23:06:13 +01:00
parent 9ebae13a43
commit 0f0d610465

View File

@ -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)
}