An open-source remote desktop application designed for self-hosting, as an alternative to TeamViewer.
Rust androidanydeskdartflatpakflutterflutter-appsioslinuxmacosp2prdpremote-controlremote-desktoprustrust-langteamviewervncwaylandwindows
Revert "fix android ci, replace use with try-finally"
21pages4480fbf787e7
diff --git a/flutter/android/app/src/main/kotlin/com/carriez/flutter_hbb/MainService.kt b/flutter/android/app/src/main/kotlin/com/carriez/flutter_hbb/MainService.ktindex 51a72b41a..535a3f8c3 100644--- a/flutter/android/app/src/main/kotlin/com/carriez/flutter_hbb/MainService.kt+++ b/flutter/android/app/src/main/kotlin/com/carriez/flutter_hbb/MainService.kt@@ -349,17 +349,12 @@ class MainService : Service() {).apply {setOnImageAvailableListener({ imageReader: ImageReader ->try {- // https://stackoverflow.com/questions/35136715/try-with-resources-use-extension-function-in-kotlin-does-not-always-work- // https://stackoverflow.com/questions/72537045/kotlin-use-with-autocloseable-type-and-a-lambda-returning-boolean- val image = imageReader.acquireLatestImage()- if (image == null) return@setOnImageAvailableListener- try {+ imageReader.acquireLatestImage().use { image ->+ if (image == null) return@setOnImageAvailableListenerval planes = image.planesval buffer = planes[0].bufferbuffer.rewind()onVideoFrameUpdate(buffer)- } finally {- image.close()}} catch (ignored: java.lang.Exception) {}