7 lines
166 B
Kotlin
7 lines
166 B
Kotlin
package cn.trans88.taxiappkotlin.ext
|
|
|
|
import android.os.Looper
|
|
|
|
fun Thread.isMainThread():Boolean{
|
|
return Thread.currentThread() ==Looper.getMainLooper().thread
|
|
} |