mirror of
https://github.com/rustdesk/rustdesk.git
synced 2025-12-12 11:06:57 +00:00
fix android possible waiting for image issue (#7994)
Signed-off-by: 21pages <pages21@163.com>
This commit is contained in:
@@ -338,9 +338,7 @@ class MainService : Service() {
|
|||||||
).apply {
|
).apply {
|
||||||
setOnImageAvailableListener({ imageReader: ImageReader ->
|
setOnImageAvailableListener({ imageReader: ImageReader ->
|
||||||
try {
|
try {
|
||||||
if (!isStart) {
|
// If not call acquireLatestImage, listener will not be called again
|
||||||
return@setOnImageAvailableListener
|
|
||||||
}
|
|
||||||
imageReader.acquireLatestImage().use { image ->
|
imageReader.acquireLatestImage().use { image ->
|
||||||
if (image == null || !isStart) return@setOnImageAvailableListener
|
if (image == null || !isStart) return@setOnImageAvailableListener
|
||||||
val planes = image.planes
|
val planes = image.planes
|
||||||
|
|||||||
Reference in New Issue
Block a user