Audio V4: Update namespace and version of 4.0 shim

Put the shim in a V4_0 namespace to comply with the ODR.
Make the include guard unique.
Split from the error prone interface adaptation change for safer review.

Patch generated with:
sed -i 's/V2_0/V4_0/g' *
sed -i "/include.*2.0/s/2\.0/4.0/" *
sed -i '/namespace android *{/anamespace V4_0 {' *
sed -Ei 's/(ifndef|define|endif)(.*)_H/\1\2_4_0_H/' *
sed -Ei 's#}(.*)namespace android$#}\1namespace V4_0\n\0#' *

Bug: 38184704
Test: Compile
Change-Id: I7d3aa46b3dfec664cbeea8a6b946456b8e8f06e3
Merged-In: I7d3aa46b3dfec664cbeea8a6b946456b8e8f06e3
Cherry-picked from master
Signed-off-by: Kevin Rocard <krocard@google.com>
diff --git a/media/libaudiohal/4.0/ConversionHelperHidl.h b/media/libaudiohal/4.0/ConversionHelperHidl.h
index c356f37..ddc8569 100644
--- a/media/libaudiohal/4.0/ConversionHelperHidl.h
+++ b/media/libaudiohal/4.0/ConversionHelperHidl.h
@@ -14,19 +14,20 @@
  * limitations under the License.
  */
 
-#ifndef ANDROID_HARDWARE_CONVERSION_HELPER_HIDL_H
-#define ANDROID_HARDWARE_CONVERSION_HELPER_HIDL_H
+#ifndef ANDROID_HARDWARE_CONVERSION_HELPER_HIDL_4_0_H
+#define ANDROID_HARDWARE_CONVERSION_HELPER_HIDL_4_0_H
 
-#include <android/hardware/audio/2.0/types.h>
+#include <android/hardware/audio/4.0/types.h>
 #include <hidl/HidlSupport.h>
 #include <utils/String8.h>
 
-using ::android::hardware::audio::V2_0::ParameterValue;
+using ::android::hardware::audio::V4_0::ParameterValue;
 using ::android::hardware::Return;
 using ::android::hardware::hidl_string;
 using ::android::hardware::hidl_vec;
 
 namespace android {
+namespace V4_0 {
 
 class ConversionHelperHidl {
   protected:
@@ -54,7 +55,7 @@
         return ret.isOk() ? OK : FAILED_TRANSACTION;
     }
 
-    status_t processReturn(const char* funcName, const Return<hardware::audio::V2_0::Result>& ret) {
+    status_t processReturn(const char* funcName, const Return<hardware::audio::V4_0::Result>& ret) {
         if (!ret.isOk()) {
             emitError(funcName, ret.description().c_str());
         }
@@ -63,7 +64,7 @@
 
     template<typename T>
     status_t processReturn(
-            const char* funcName, const Return<T>& ret, hardware::audio::V2_0::Result retval) {
+            const char* funcName, const Return<T>& ret, hardware::audio::V4_0::Result retval) {
         if (!ret.isOk()) {
             emitError(funcName, ret.description().c_str());
         }
@@ -73,11 +74,12 @@
   private:
     const char* mClassName;
 
-    static status_t analyzeResult(const hardware::audio::V2_0::Result& result);
+    static status_t analyzeResult(const hardware::audio::V4_0::Result& result);
 
     void emitError(const char* funcName, const char* description);
 };
 
+}  // namespace V4_0
 }  // namespace android
 
-#endif // ANDROID_HARDWARE_CONVERSION_HELPER_HIDL_H
+#endif // ANDROID_HARDWARE_CONVERSION_HELPER_HIDL_4_0_H