camera: Migrate ndk_vendor client implementation to AIDL.

With HIDL deprecated, cameraservice's vndk client interfaces have been
updated to using AIDL. This CL drops support for the HIDL vndk client
interface.

When vendor partition is rebuilt for future version of android, it
should automatically pick up the new new client implementation.
Cameraservice will continue to support both HIDL and AIDL vndk clients.

The changes are simple 1:1 mapping of HIDL interface logic with AIDL
interface logic.

Bug: 243593375
Test: atest ACameraNdkVendorTest
Change-Id: Ic03bbf4e275bb3eddc4ca4e322adc84fdf03f482
diff --git a/camera/ndk/impl/ACameraManager.h b/camera/ndk/impl/ACameraManager.h
index d53d809..0dd79da 100644
--- a/camera/ndk/impl/ACameraManager.h
+++ b/camera/ndk/impl/ACameraManager.h
@@ -46,7 +46,7 @@
  */
 class CameraManagerGlobal final : public RefBase {
   public:
-    static CameraManagerGlobal& getInstance();
+    static sp<CameraManagerGlobal> getInstance();
     sp<hardware::ICameraService> getCameraService();
 
     void registerAvailabilityCallback(
@@ -257,7 +257,7 @@
 
     // For the singleton instance
     static Mutex sLock;
-    static CameraManagerGlobal* sInstance;
+    static wp<CameraManagerGlobal> sInstance;
     CameraManagerGlobal() {};
     ~CameraManagerGlobal();
 };
@@ -271,7 +271,7 @@
  */
 struct ACameraManager {
     ACameraManager() :
-            mGlobalManager(&(android::acam::CameraManagerGlobal::getInstance())) {}
+            mGlobalManager(android::acam::CameraManagerGlobal::getInstance()) {}
     ~ACameraManager();
     camera_status_t getCameraIdList(ACameraIdList** cameraIdList);
     static void     deleteCameraIdList(ACameraIdList* cameraIdList);