Wait for camera extensions service during initialization

During Camera2 Extensions initialization we need to check
if the Camera Extensions Proxy service supports advanced
extensions. Now we're not only waiting
for the service to connect but were also waiting for
the query for advanced extensions to finish.

Fixes: 198818625
Change-Id: I8040eab80a4b97f77b551152b3f76f93f9b8af88
This commit is contained in:
Diego Wilson
2021-09-15 23:33:23 +00:00
parent 21cb293e88
commit 0cde32dbf2

View File

@@ -263,12 +263,12 @@ public final class CameraExtensionCharacteristics {
@Override
public void onServiceConnected(ComponentName component, IBinder binder) {
mProxy = ICameraExtensionsProxyService.Stub.asInterface(binder);
mInitFuture.setStatus(true);
try {
mSupportsAdvancedExtensions = mProxy.advancedExtensionsSupported();
} catch (RemoteException e) {
Log.e(TAG, "Remote IPC failed!");
}
mInitFuture.setStatus(true);
}
};
ctx.bindService(intent, Context.BIND_AUTO_CREATE | Context.BIND_IMPORTANT |