Implement session param injection in CameraService

- This allows injecting session params into existing camera clients.
- The injection is cleared upon the camera closing, and we do not keep
  state from one camera open to the next.
- We restrict the injection to only allow overriding vendor tags for now.
- The actionable parts of the change are gated behind the inject_session_params
  flag to allow easy flipping. When false, this feature will have no effect.

Bug: 308984721
Test: I tested that this works using adb shell.
Change-Id: I27d955d035dde57b63a220c5d68b505ec636c401
diff --git a/services/camera/libcameraservice/CameraService.h b/services/camera/libcameraservice/CameraService.h
index cabac17..7dc0b91 100644
--- a/services/camera/libcameraservice/CameraService.h
+++ b/services/camera/libcameraservice/CameraService.h
@@ -232,7 +232,11 @@
             const hardware::CameraExtensionSessionStats& stats, std::string* sessionKey /*out*/);
 
     virtual binder::Status remapCameraIds(const hardware::CameraIdRemapping&
-        cameraIdRemapping);
+            cameraIdRemapping);
+
+    virtual binder::Status injectSessionParams(
+            const std::string& cameraId,
+            const hardware::camera2::impl::CameraMetadataNative& sessionParams);
 
     virtual binder::Status createDefaultRequest(const std::string& cameraId, int templateId,
             /*out*/
@@ -412,6 +416,10 @@
         // Stop the injection camera and restore to internal camera session.
         virtual status_t stopInjection() = 0;
 
+        // Inject session parameters into an existing session.
+        virtual status_t injectSessionParams(
+                const hardware::camera2::impl::CameraMetadataNative& sessionParams) = 0;
+
     protected:
         BasicClient(const sp<CameraService>& cameraService,
                 const sp<IBinder>& remoteCallback,