camera (v)ndk: Setup vendor tags if they're not already, while calling getCameraService()
It is possible that by the time CameraManagerGlobal::getCameraService()
is called, cameraservice is up, however camera HAL providers haven't
registered themselves with cameraservice. In this case, the vendor tag
cache will not be available. As a result, we should check and set it up while
checking for cameraserver validity for subsequent calls of
CameraManagerGlobal::getCameraService().
Bug: 368235553
Flag: EXEMPT BUGFIX
Test: Vendor service which comes up before camera HAL registers itself
with cameraserver can eventually, retrieve vendor tags.
Change-Id: I51ea31c11692498f1c07d7efdc91e4b176f73f27
Signed-off-by: Jayant Chowdhary <jchowdhary@google.com>
diff --git a/camera/ndk/impl/ACameraManager.h b/camera/ndk/impl/ACameraManager.h
index f4124ef..cb7a4ff 100644
--- a/camera/ndk/impl/ACameraManager.h
+++ b/camera/ndk/impl/ACameraManager.h
@@ -105,6 +105,8 @@
template <class T>
void registerAvailCallback(const DeviceContext& deviceContext, const T* callback);
+ bool setupVendorTags(sp<hardware::ICameraService> &cameraService);
+
class DeathNotifier : public IBinder::DeathRecipient {
public:
explicit DeathNotifier(CameraManagerGlobal* cm) : mCameraManager(cm) {}