fix: pair front camera analysis with a local drained preview surface

This commit is contained in:
zenord
2026-10-13 18:54:59 +08:00
parent 4010675f8c
commit 688bb7d6b3
20 changed files with 453 additions and 24 deletions
+6
View File
@@ -4,6 +4,12 @@ class Looper { companion object {
fun getMainLooper()=main
fun myLooper()=if(Thread.currentThread()===owner) main else other
} }
class HandlerThread(val name: String) {
val looper=Looper();var quit=false
fun start() { threads+=this }
fun quitSafely(): Boolean {quit=true;return true}
companion object {val threads=mutableListOf<HandlerThread>()}
}
object SystemClock { fun elapsedRealtime()=CameraClock.now }
class Handler(val looper: Looper=Looper.getMainLooper()) {
fun post(r: Runnable): Boolean=postDelayed(r,0)