Skip to content

Commit

Permalink
比较引用===
Browse files Browse the repository at this point in the history
  • Loading branch information
TestPlanB committed Dec 30, 2021
1 parent f3bb21d commit ea33a85
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -212,6 +212,6 @@ abstract class ShadowPluginLoader(hostAppContext: Context) : DelegateProvider, D
}

private fun isUiThread(): Boolean {
return Thread.currentThread() == Looper.getMainLooper().thread
return Thread.currentThread() === Looper.getMainLooper().thread
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ class PluginServiceManager(mPluginLoader: ShadowPluginLoader, mHostContext: Cont
private val mainThreadHandler = Handler(Looper.getMainLooper())

private fun <T> execInMainThread(action: () -> T): T {
if (Thread.currentThread() == Looper.getMainLooper().thread) {
if (Thread.currentThread() === Looper.getMainLooper().thread) {
return action()
} else {
val countDownLatch = CountDownLatch(1)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,7 @@ internal class DynamicPluginLoader(hostContext: Context, uuid: String) {

private fun isUiThread(): Boolean {

return Thread.currentThread() == Looper.getMainLooper().thread
return Thread.currentThread() === Looper.getMainLooper().thread
}

/**
Expand Down

0 comments on commit ea33a85

Please sign in to comment.