Revert "Extend EVS interfaces and data types"

This reverts commit e6976fce80a9a0951c6bc6f668b2de032ccc4d34.
diff --git a/automotive/evs/1.1/default/EvsEnumerator.cpp b/automotive/evs/1.1/default/EvsEnumerator.cpp
index a010729..b324907 100644
--- a/automotive/evs/1.1/default/EvsEnumerator.cpp
+++ b/automotive/evs/1.1/default/EvsEnumerator.cpp
@@ -33,7 +33,6 @@
 //        constructs a new instance for each client.
 std::list<EvsEnumerator::CameraRecord>   EvsEnumerator::sCameraList;
 wp<EvsDisplay>                           EvsEnumerator::sActiveDisplay;
-unique_ptr<ConfigManager>                EvsEnumerator::sConfigManager;
 
 
 EvsEnumerator::EvsEnumerator() {
@@ -41,11 +40,9 @@
 
     // Add sample camera data to our list of cameras
     // In a real driver, this would be expected to can the available hardware
-    sConfigManager =
-        ConfigManager::Create("/etc/automotive/evs/evs_sample_configuration.xml");
-    for (auto v : sConfigManager->getCameraList()) {
-        sCameraList.emplace_back(v.c_str());
-    }
+    sCameraList.emplace_back(EvsCamera::kCameraName_Backup);
+    sCameraList.emplace_back("LaneView");
+    sCameraList.emplace_back("right turn");
 }
 
 
@@ -60,7 +57,7 @@
     std::vector<CameraDesc_1_0> descriptions;
     descriptions.reserve(numCameras);
     for (const auto& cam : sCameraList) {
-        descriptions.push_back( cam.desc.v1 );
+        descriptions.push_back( cam.desc );
     }
 
     // Encapsulate our camera descriptions in the HIDL vec type
@@ -81,7 +78,7 @@
     // Find the named camera
     CameraRecord *pRecord = nullptr;
     for (auto &&cam : sCameraList) {
-        if (cam.desc.v1.cameraId == cameraId) {
+        if (cam.desc.cameraId == cameraId) {
             // Found a match!
             pRecord = &cam;
             break;
@@ -102,12 +99,7 @@
     }
 
     // Construct a camera instance for the caller
-    if (sConfigManager == nullptr) {
-        pActiveCamera = EvsCamera::Create(cameraId.c_str());
-    } else {
-        pActiveCamera = EvsCamera::Create(cameraId.c_str(),
-                                          sConfigManager->getCameraInfo(cameraId));
-    }
+    pActiveCamera = new EvsCamera(cameraId.c_str());
     pRecord->activeInstance = pActiveCamera;
     if (pActiveCamera == nullptr) {
         ALOGE("Failed to allocate new EvsCamera object for %s\n", cameraId.c_str());
@@ -128,15 +120,15 @@
 
     // Get the camera id so we can find it in our list
     std::string cameraId;
-    pCamera_1_1->getCameraInfo_1_1([&cameraId](CameraDesc desc) {
-                               cameraId = desc.v1.cameraId;
+    pCamera_1_1->getCameraInfo([&cameraId](CameraDesc desc) {
+                               cameraId = desc.cameraId;
                            }
     );
 
     // Find the named camera
     CameraRecord *pRecord = nullptr;
     for (auto &&cam : sCameraList) {
-        if (cam.desc.v1.cameraId == cameraId) {
+        if (cam.desc.cameraId == cameraId) {
             // Found a match!
             pRecord = &cam;
             break;
@@ -217,89 +209,6 @@
 }
 
 
-// Methods from ::android::hardware::automotive::evs::V1_1::IEvsEnumerator follow.
-Return<void> EvsEnumerator::getCameraList_1_1(getCameraList_1_1_cb _hidl_cb)  {
-    ALOGD("getCameraList");
-
-    const unsigned numCameras = sCameraList.size();
-
-    // Build up a packed array of CameraDesc for return
-    // NOTE:  Only has to live until the callback returns
-    std::vector<CameraDesc_1_1> descriptions;
-    descriptions.reserve(numCameras);
-    for (const auto& cam : sCameraList) {
-        descriptions.push_back( cam.desc );
-    }
-
-    // Encapsulate our camera descriptions in the HIDL vec type
-    hidl_vec<CameraDesc_1_1> hidlCameras(descriptions);
-
-    // Send back the results
-    ALOGD("reporting %zu cameras available", hidlCameras.size());
-    _hidl_cb(hidlCameras);
-
-    // HIDL convention says we return Void if we sent our result back via callback
-    return Void();
-}
-
-Return<sp<IEvsCamera_1_1>>
-EvsEnumerator::openCamera_1_1(const hidl_string& cameraId,
-                              const Stream& streamCfg) {
-    // Find the named camera
-    CameraRecord *pRecord = nullptr;
-    for (auto &&cam : sCameraList) {
-        if (cam.desc.v1.cameraId == cameraId) {
-            // Found a match!
-            pRecord = &cam;
-            break;
-        }
-    }
-
-    // Is this a recognized camera id?
-    if (!pRecord) {
-        ALOGE("Requested camera %s not found", cameraId.c_str());
-        return nullptr;
-    }
-
-    // Has this camera already been instantiated by another caller?
-    sp<EvsCamera> pActiveCamera = pRecord->activeInstance.promote();
-    if (pActiveCamera != nullptr) {
-        ALOGW("Killing previous camera because of new caller");
-        closeCamera(pActiveCamera);
-    }
-
-    // Construct a camera instance for the caller
-    if (sConfigManager == nullptr) {
-        pActiveCamera = EvsCamera::Create(cameraId.c_str());
-    } else {
-        pActiveCamera = EvsCamera::Create(cameraId.c_str(),
-                                          sConfigManager->getCameraInfo(cameraId),
-                                          &streamCfg);
-    }
-
-    pRecord->activeInstance = pActiveCamera;
-    if (pActiveCamera == nullptr) {
-        ALOGE("Failed to allocate new EvsCamera object for %s\n", cameraId.c_str());
-    }
-
-    return pActiveCamera;
-}
-
-
-EvsEnumerator::CameraRecord* EvsEnumerator::findCameraById(const std::string& cameraId) {
-    // Find the named camera
-    CameraRecord *pRecord = nullptr;
-    for (auto &&cam : sCameraList) {
-        if (cam.desc.v1.cameraId == cameraId) {
-            // Found a match!
-            pRecord = &cam;
-            break;
-        }
-    }
-
-    return pRecord;
-}
-
 } // namespace implementation
 } // namespace V1_1
 } // namespace evs