Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 0b0c9dc8 authored by Emilian Peev's avatar Emilian Peev
Browse files

Camera: Pass an executor during the extension characteristics service bind call

Camera extensions characteristics will bind to the camera extensions
proxy service without passing a dedicated executor for the connection
callbacks. In this case, the callbacks will be called in the main thread
which can be problematic for clients using the same thread.

Bug: 191192317
Test: Camera CTS
Change-Id: Ic952edd766d26016b6203c84d067a6b1061ed090
parent a388d253
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -255,9 +255,9 @@ public final class CameraExtensionCharacteristics {
                        }
                    }
                };
                ctx.bindService(intent, mConnection, Context.BIND_AUTO_CREATE |
                        Context.BIND_IMPORTANT | Context.BIND_ABOVE_CLIENT |
                        Context.BIND_NOT_VISIBLE);
                ctx.bindService(intent, Context.BIND_AUTO_CREATE | Context.BIND_IMPORTANT |
                        Context.BIND_ABOVE_CLIENT | Context.BIND_NOT_VISIBLE,
                        android.os.AsyncTask.THREAD_POOL_EXECUTOR, mConnection);

                try {
                    mInitFuture.get(PROXY_SERVICE_DELAY_MS, TimeUnit.MILLISECONDS);