add try catch on android setCodecInfo in case of unexpected crash (#13280)

Signed-off-by: 21pages <sunboeasy@gmail.com>
This commit is contained in:
21pages
2025-10-24 21:04:18 +08:00
committed by GitHub
parent 938e165470
commit 965cb704ec

View File

@@ -62,7 +62,13 @@ class MainActivity : FlutterActivity() {
channelTag channelTag
) )
initFlutterChannel(flutterMethodChannel!!) initFlutterChannel(flutterMethodChannel!!)
thread { setCodecInfo() } thread {
try {
setCodecInfo()
} catch (e: Exception) {
Log.e("MainActivity", "Failed to setCodecInfo: ${e.message}", e)
}
}
} }
override fun onResume() { override fun onResume() {