Android: Use a dedicated thread for camera callbacks


Camera availability callbacks were handled by a Handler using the
Android UI thread looper. During application teardown, the Android UI
thread blocks waiting for the Qt main thread to exit. If the Qt main
thread destroys QAndroidVideoDevices, it posts cleanup to the blocked UI
looper causing a deadlock.

This patch adds a dedicated HandlerThread for camera availability
callbacks, so cleanup no longer depends on the UI thread's looper.

This is the same fix that was applied to audio device callbacks in the
fix for QTBUG-147200.

Fixes: QTBUG-149229
Pick-to: 6.12 6.11
Change-Id: I4bb8f59dc7670a9777edf6664fad85ba2add72e9
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
Reviewed-by: Nils Petter Skålerud <nils.petter.skalerud@qt.io>
commit677ac4ba7c5573090af60d3f476d901c54243c2f
parentca7e9ed5ea61fcf188b5543474773bcd4c553442
authorMikko Hallamaa <mikko.hallamaa@qt.io>
committerMikko Hallamaa <mikko.hallamaa@qt.io>
commit timeFri, 4 Sep 2026 13:32:49 +0000