PlayerAndroid/app/src/main/java/software/lavender/music/extensions/looper.kt

7 lines
259 B
Kotlin

package software.lavender.music.extensions
import android.os.Build
import android.os.Looper
inline val Looper.isCurrentThreadCompat: Boolean
get() = if (Build.VERSION.SDK_INT > Build.VERSION_CODES.M) isCurrentThread else Thread.currentThread() == thread