mirror of
https://github.com/TeamNewPipe/NewPipe
synced 2025-04-01 08:17:01 +00:00
Added docs for isInBackground
This commit is contained in:
parent
9ebae13a43
commit
0f0d610465
@ -31,6 +31,11 @@ object AppLifecycleObserver : DefaultLifecycleObserver {
|
|||||||
Log.d(TAG, "App moved to background: ")
|
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 {
|
fun isInBackground(): Boolean {
|
||||||
return sharedPreferences.getBoolean(KEY_IS_IN_BACKGROUND, true)
|
return sharedPreferences.getBoolean(KEY_IS_IN_BACKGROUND, true)
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user