Handle logical camera devices properly

- HighPriorityCameraClient test case is not executed against logical
  camera devices because clients are not allowed to change camera
  parameters via logical cameras.
- CameraStreamExternalBuffering test case closes logical camera device
  explicitly, to avoid any influence on following test scenarios.

Bug: 319165229
Test: atest VtsHalEvsTargetTest
Change-Id: I734d701a2056ab84fe74179b083c3f6c5463447b
diff --git a/automotive/evs/aidl/vts/VtsHalEvsTargetTest.cpp b/automotive/evs/aidl/vts/VtsHalEvsTargetTest.cpp
index 3419b3c..477de31 100644
--- a/automotive/evs/aidl/vts/VtsHalEvsTargetTest.cpp
+++ b/automotive/evs/aidl/vts/VtsHalEvsTargetTest.cpp
@@ -1399,6 +1399,12 @@
 
     // Test each reported camera
     for (auto&& cam : mCameraInfo) {
+        bool isLogicalCam = false;
+        if (getPhysicalCameraIds(cam.id, isLogicalCam); isLogicalCam) {
+            LOG(INFO) << "Skip a logical device, " << cam.id;
+            continue;
+        }
+
         // Request available display IDs
         uint8_t targetDisplayId = 0;
         std::vector<uint8_t> displayIds;
@@ -1973,6 +1979,13 @@
 
     // Test each reported camera
     for (auto&& cam : mCameraInfo) {
+        bool isLogicalCam = false;
+        getPhysicalCameraIds(cam.id, isLogicalCam);
+        if (isLogicalCam) {
+            LOG(INFO) << "Skip a logical device, " << cam.id;
+            continue;
+        }
+
         // Read a target resolution from the metadata
         Stream targetCfg = getFirstStreamConfiguration(
                 reinterpret_cast<camera_metadata_t*>(cam.metadata.data()));
@@ -2014,9 +2027,6 @@
             }
         }
 
-        bool isLogicalCam = false;
-        getPhysicalCameraIds(cam.id, isLogicalCam);
-
         std::shared_ptr<IEvsCamera> pCam;
         ASSERT_TRUE(mEnumerator->openCamera(cam.id, targetCfg, &pCam).isOk());
         EXPECT_NE(pCam, nullptr);
@@ -2027,11 +2037,6 @@
         // Request to import buffers
         int delta = 0;
         auto status = pCam->importExternalBuffers(buffers, &delta);
-        if (isLogicalCam) {
-            ASSERT_FALSE(status.isOk());
-            continue;
-        }
-
         ASSERT_TRUE(status.isOk());
         EXPECT_GE(delta, kBuffersToHold);