Skip to content

Commit 8e3523b

Browse files
committed
Don't run android in a bg thread since no issue have been reported
1 parent 37f7aa6 commit 8e3523b

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

android/src/main/kotlin/org/lichess/sound_effect/SoundEffectPlugin.kt

+1-4
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ import io.flutter.plugin.common.MethodCall
88
import io.flutter.plugin.common.MethodChannel
99
import io.flutter.plugin.common.MethodChannel.MethodCallHandler
1010
import io.flutter.plugin.common.MethodChannel.Result
11-
import io.flutter.plugin.common.StandardMethodCodec
1211

1312
class SoundEffectPlugin: FlutterPlugin, MethodCallHandler, SoundPool.OnLoadCompleteListener {
1413
companion object {
@@ -22,9 +21,7 @@ class SoundEffectPlugin: FlutterPlugin, MethodCallHandler, SoundPool.OnLoadCompl
2221
private val audioMap = HashMap<String, Int>()
2322

2423
override fun onAttachedToEngine(flutterPluginBinding: FlutterPlugin.FlutterPluginBinding) {
25-
val taskQueue =
26-
flutterPluginBinding.binaryMessenger.makeBackgroundTaskQueue()
27-
channel = MethodChannel(flutterPluginBinding.binaryMessenger, CHANNEL_NAME, StandardMethodCodec.INSTANCE, taskQueue)
24+
channel = MethodChannel(flutterPluginBinding.binaryMessenger, CHANNEL_NAME)
2825
binding = flutterPluginBinding
2926
channel.setMethodCallHandler(this)
3027
}

0 commit comments

Comments
 (0)