Delete api_level_fixes.h

Bug: 126591498
Test: run locally
Change-Id: I9046f1ed49c4c35ab72f5b035f0733319f9a38b7
diff --git a/Android.bp b/Android.bp
index 54084f1..a9ee724 100644
--- a/Android.bp
+++ b/Android.bp
@@ -55,7 +55,6 @@
     header_libs: [
         "cuttlefish_common_headers",
         "cuttlefish_kernel_headers",
-        "cuttlefish_shared_config",
     ],
     target: {
         host: {
@@ -79,7 +78,6 @@
     header_libs: [
         "cuttlefish_common_headers_product",
         "cuttlefish_kernel_headers_product",
-        "cuttlefish_shared_config_product",
     ],
     target: {
         host: {
diff --git a/guest/hals/audio/legacy/audio_hal.cpp b/guest/hals/audio/legacy/audio_hal.cpp
index 8b528a6..a865d46 100644
--- a/guest/hals/audio/legacy/audio_hal.cpp
+++ b/guest/hals/audio/legacy/audio_hal.cpp
@@ -16,21 +16,20 @@
 #include "guest/hals/audio/legacy/vsoc_audio.h"
 
 #include "guest/hals/audio/legacy/audio_hal.h"
-#include "guest/libs/platform_support/api_level_fixes.h"
 
 static hw_module_methods_t hal_module_methods = {
-  VSOC_STATIC_INITIALIZER(open) cvd::GceAudio::Open,
+  .open = cvd::GceAudio::Open,
 };
 
 
 audio_module HAL_MODULE_INFO_SYM = {
-  VSOC_STATIC_INITIALIZER(common) {
-    VSOC_STATIC_INITIALIZER(tag) HARDWARE_MODULE_TAG,
-    VSOC_STATIC_INITIALIZER(module_api_version) AUDIO_MODULE_API_VERSION_0_1,
-    VSOC_STATIC_INITIALIZER(hal_api_version) HARDWARE_HAL_API_VERSION,
-    VSOC_STATIC_INITIALIZER(id) AUDIO_HARDWARE_MODULE_ID,
-    VSOC_STATIC_INITIALIZER(name) "GCE Audio HW HAL",
-    VSOC_STATIC_INITIALIZER(author) "The Android Open Source Project",
-    VSOC_STATIC_INITIALIZER(methods) &hal_module_methods,
+  .common = {
+    .tag = HARDWARE_MODULE_TAG,
+    .module_api_version = AUDIO_MODULE_API_VERSION_0_1,
+    .hal_api_version = HARDWARE_HAL_API_VERSION,
+    .id = AUDIO_HARDWARE_MODULE_ID,
+    .name = "GCE Audio HW HAL",
+    .author = "The Android Open Source Project",
+    .methods = &hal_module_methods,
   },
 };
diff --git a/guest/hals/audio/legacy/audio_hal.h b/guest/hals/audio/legacy/audio_hal.h
index 8665e8f..db547ff 100644
--- a/guest/hals/audio/legacy/audio_hal.h
+++ b/guest/hals/audio/legacy/audio_hal.h
@@ -29,13 +29,9 @@
 
 #include <hardware/hardware.h>
 
-#include "guest/libs/platform_support/api_level_fixes.h"
-
 #pragma GCC diagnostic push
 #pragma  GCC diagnostic ignored "-Wparentheses"
-#if VSOC_PLATFORM_SDK_AFTER(K)
 #pragma  GCC diagnostic ignored "-Wgnu-designator"
-#endif
 #include <system/audio.h>
 #pragma GCC diagnostic pop
 
diff --git a/guest/hals/audio/legacy/vsoc_audio.cpp b/guest/hals/audio/legacy/vsoc_audio.cpp
index a59c04d..8d6141e 100644
--- a/guest/hals/audio/legacy/vsoc_audio.cpp
+++ b/guest/hals/audio/legacy/vsoc_audio.cpp
@@ -33,7 +33,6 @@
 #include "guest/hals/audio/legacy/vsoc_audio.h"
 #include "guest/hals/audio/legacy/vsoc_audio_input_stream.h"
 #include "guest/hals/audio/legacy/vsoc_audio_output_stream.h"
-#include "guest/libs/platform_support/api_level_fixes.h"
 #include "guest/libs/remoter/remoter_framework_pkt.h"
 
 using cvd::LockGuard;
diff --git a/guest/hals/audio/legacy/vsoc_audio.h b/guest/hals/audio/legacy/vsoc_audio.h
index a5f551a..7b96878 100644
--- a/guest/hals/audio/legacy/vsoc_audio.h
+++ b/guest/hals/audio/legacy/vsoc_audio.h
@@ -25,7 +25,6 @@
 #include "common/vsoc/lib/vsoc_audio_message.h"
 #include "guest/hals/audio/legacy/audio_hal.h"
 #include "guest/hals/audio/legacy/vsoc_audio_input_stream.h"
-#include "guest/libs/platform_support/api_level_fixes.h"
 
 namespace cvd {
 
diff --git a/guest/hals/audio/legacy/vsoc_audio_input_stream.cpp b/guest/hals/audio/legacy/vsoc_audio_input_stream.cpp
index 1ffd29b..6dd61f7 100644
--- a/guest/hals/audio/legacy/vsoc_audio_input_stream.cpp
+++ b/guest/hals/audio/legacy/vsoc_audio_input_stream.cpp
@@ -28,7 +28,6 @@
 #include "guest/hals/audio/legacy/audio_hal.h"
 #include "guest/hals/audio/legacy/vsoc_audio.h"
 #include "guest/hals/audio/legacy/vsoc_audio_input_stream.h"
-#include "guest/libs/platform_support/api_level_fixes.h"
 
 namespace cvd {
 
diff --git a/guest/hals/audio/legacy/vsoc_audio_output_stream.cpp b/guest/hals/audio/legacy/vsoc_audio_output_stream.cpp
index 255b6fd..b0c6037 100644
--- a/guest/hals/audio/legacy/vsoc_audio_output_stream.cpp
+++ b/guest/hals/audio/legacy/vsoc_audio_output_stream.cpp
@@ -29,7 +29,6 @@
 #include "guest/hals/audio/legacy/audio_hal.h"
 #include "guest/hals/audio/legacy/vsoc_audio.h"
 #include "guest/hals/audio/legacy/vsoc_audio_output_stream.h"
-#include "guest/libs/platform_support/api_level_fixes.h"
 #include "guest/libs/remoter/remoter_framework_pkt.h"
 
 #if defined(AUDIO_DEVICE_API_VERSION_3_0)
@@ -270,12 +269,7 @@
   out->message_header_.format = config->format;
   out->message_header_.channel_mask = config->channel_mask;
   out->message_header_.frame_rate = config->sample_rate;
-  out->frame_count_ =
-#if VSOC_PLATFORM_SDK_AFTER(K)
-      config->frame_count;
-#else
-      0;
-#endif
+  out->frame_count_ = config->frame_count;
   out->common.get_sample_rate =
       cvd::thunk<audio_stream, &GceAudioOutputStream::GetSampleRate>;
   out->common.set_sample_rate =
diff --git a/guest/hals/camera/EmulatedBaseCamera.cpp b/guest/hals/camera/EmulatedBaseCamera.cpp
index dc84c9b..8ef553a 100644
--- a/guest/hals/camera/EmulatedBaseCamera.cpp
+++ b/guest/hals/camera/EmulatedBaseCamera.cpp
@@ -55,35 +55,11 @@
   ALOGV("%s", __FUNCTION__);
 
   info->device_version = mCameraDeviceVersion;
-#if VSOC_PLATFORM_SDK_BEFORE(O)
-  // static_camera_characteristics should be initialized if and only if two
-  // conditions hold:
-  //    CAMERA_MODULE_API_VERSION_2_0 or higher
-  //    CAMERA_DEVICE_API_VERSION_2_0 or higher
-  // See android/hardware/libhardware/include/hardware/camera_common.h
-  //
-  // The CAMERA_MODULE_API_VERSION is above 2 on all of the supported
-  // branches.
-  //
-  // The CVD supports both CAMERA_DEVICE_API_VERSION_1_0 and
-  // CAMERA_DEVICE_API_VERSION_3_0.
-  //
-  // By the spec, the framework should not look at this field on
-  // CAMERA_DEVICE_API_VERSION_1_0. However, the framework
-  // referenced them unconditionally in the M, N, and N-MR1 branches.
-  // See b/67841929 for evidence.
-  //
-  // We have to support those branches, so make initialization uconditional.
-  // However, keep the 0xcafef00d fake initiziation on O and later to ensure
-  // that we'll catch future framework changes that violate the spec.
-  info->static_camera_characteristics = mCameraInfo;
-#else
   if (mCameraDeviceVersion >= HARDWARE_DEVICE_API_VERSION(2, 0)) {
     info->static_camera_characteristics = mCameraInfo;
   } else {
     info->static_camera_characteristics = (camera_metadata_t*)0xcafef00d;
   }
-#endif
 
   return NO_ERROR;
 }
@@ -98,11 +74,9 @@
   return INVALID_OPERATION;
 }
 
-#if VSOC_PLATFORM_SDK_AFTER(J_MR2)
 camera_device_status_t EmulatedBaseCamera::getHotplugStatus() {
   return CAMERA_DEVICE_STATUS_PRESENT;
 }
-#endif
 
 status_t EmulatedBaseCamera::setTorchMode(bool /* enabled */) {
   ALOGE("%s: not supported", __FUNCTION__);
diff --git a/guest/hals/camera/EmulatedBaseCamera.h b/guest/hals/camera/EmulatedBaseCamera.h
index 7b87589..ba4b98e 100644
--- a/guest/hals/camera/EmulatedBaseCamera.h
+++ b/guest/hals/camera/EmulatedBaseCamera.h
@@ -20,13 +20,8 @@
 #include <hardware/camera_common.h>
 #include <utils/Errors.h>
 #include "CameraConfiguration.h"
-#include "guest/libs/platform_support/api_level_fixes.h"
-#if VSOC_PLATFORM_SDK_BEFORE(O_MR1)
-#include <camera/CameraParameters.h>
-#else
 #include <CameraParameters.h>
 using ::android::hardware::camera::common::V1_0::helper::CameraParameters;
-#endif
 
 namespace android {
 
@@ -82,9 +77,7 @@
    */
   virtual status_t unplugCamera();
 
-#if VSOC_PLATFORM_SDK_AFTER(J_MR2)
   virtual camera_device_status_t getHotplugStatus();
-#endif
 
   /* Closes connection to the emulated camera.
    * This method is called in response to camera_device::close callback.
diff --git a/guest/hals/camera/EmulatedCamera.cpp b/guest/hals/camera/EmulatedCamera.cpp
index c483524..e48d579 100644
--- a/guest/hals/camera/EmulatedCamera.cpp
+++ b/guest/hals/camera/EmulatedCamera.cpp
@@ -23,8 +23,6 @@
  * API.
  */
 
-#include "guest/libs/platform_support/api_level_fixes.h"
-
 #define LOG_NDEBUG 0
 #define LOG_TAG "EmulatedCamera_Camera"
 #include <log/log.h>
@@ -259,11 +257,9 @@
     info->orientation = 0;
   }
 
-#if VSOC_PLATFORM_SDK_AFTER(L_MR1)
   info->resource_cost = 100;
   info->conflicting_devices = NULL;
   info->conflicting_devices_length = 0;
-#endif
 
   return EmulatedBaseCamera::getCameraInfo(info);
 }
diff --git a/guest/hals/camera/EmulatedCamera.h b/guest/hals/camera/EmulatedCamera.h
index 9da675d..a2de643 100644
--- a/guest/hals/camera/EmulatedCamera.h
+++ b/guest/hals/camera/EmulatedCamera.h
@@ -17,8 +17,6 @@
 #ifndef HW_EMULATOR_CAMERA_EMULATED_CAMERA_H
 #define HW_EMULATOR_CAMERA_EMULATED_CAMERA_H
 
-#include "guest/libs/platform_support/api_level_fixes.h"
-
 /*
  * Contains declaration of a class EmulatedCamera that encapsulates
  * functionality common to all version 1.0 emulated camera devices ("fake",
@@ -28,13 +26,9 @@
  * defined by camera_device_ops_t API.
  */
 
-#if VSOC_PLATFORM_SDK_BEFORE(O_MR1)
-#include <camera/CameraParameters.h>
-#else
 #include <CameraParameters.h>
 using ::android::hardware::camera::common::V1_0::helper::CameraParameters;
 using ::android::hardware::camera::common::V1_0::helper::Size;
-#endif
 
 #include "CallbackNotifier.h"
 #include "EmulatedBaseCamera.h"
diff --git a/guest/hals/camera/EmulatedCameraDevice.cpp b/guest/hals/camera/EmulatedCameraDevice.cpp
index 7464cc9..d741b73 100644
--- a/guest/hals/camera/EmulatedCameraDevice.cpp
+++ b/guest/hals/camera/EmulatedCameraDevice.cpp
@@ -324,11 +324,7 @@
     // If thread is running and readyToRun() has not finished running,
     //    then wait until it is done.
     Mutex::Autolock lock(mCameraDevice->mObjectLock);
-#if VSOC_PLATFORM_SDK_AFTER(J_MR2)
     if (isRunning() && (mThreadControl < 0 || mControlFD < 0)) {
-#else
-    if (getTid() != -1 && (mThreadControl < 0 || mControlFD < 0)) {
-#endif
       mSetup.wait(mCameraDevice->mObjectLock);
     }
   }
diff --git a/guest/hals/camera/EmulatedCameraDevice.h b/guest/hals/camera/EmulatedCameraDevice.h
index a2db315..ab654eb 100644
--- a/guest/hals/camera/EmulatedCameraDevice.h
+++ b/guest/hals/camera/EmulatedCameraDevice.h
@@ -32,14 +32,9 @@
 #include "Converters.h"
 #include "EmulatedCameraCommon.h"
 
-#include "guest/libs/platform_support/api_level_fixes.h"
-#if VSOC_PLATFORM_SDK_BEFORE(O_MR1)
-#include <camera/CameraParameters.h>
-#else
 #include <CameraParameters.h>
 
 using ::android::hardware::camera::common::V1_0::helper::CameraParameters;
-#endif
 
 namespace android {
 
diff --git a/guest/hals/camera/EmulatedCameraFactory.cpp b/guest/hals/camera/EmulatedCameraFactory.cpp
index 4dfe5fe..857f2ed 100644
--- a/guest/hals/camera/EmulatedCameraFactory.cpp
+++ b/guest/hals/camera/EmulatedCameraFactory.cpp
@@ -24,16 +24,11 @@
 #include <log/log.h>
 #include <cutils/properties.h>
 #include "EmulatedFakeCamera.h"
-#include "guest/libs/platform_support/api_level_fixes.h"
 
-#if VSOC_PLATFORM_SDK_AFTER(J_MR2)
 #include "EmulatedCameraHotplugThread.h"
 #include "EmulatedFakeCamera2.h"
-#endif
 
-#if VSOC_PLATFORM_SDK_AFTER(L_MR1)
 #include "EmulatedFakeCamera3.h"
-#endif
 
 #include "EmulatedCameraFactory.h"
 
@@ -46,9 +41,7 @@
 }
 
 EmulatedCameraFactory::EmulatedCameraFactory()
-#if VSOC_PLATFORM_SDK_AFTER(J_MR2)
     : mCallbacks(NULL)
-#endif
 {
   mCameraConfiguration.Init();
   const std::vector<cvd::CameraDefinition>& cameras =
@@ -61,13 +54,11 @@
 
   ALOGV("%zu cameras are being emulated.", getEmulatedCameraNum());
 
-#if VSOC_PLATFORM_SDK_AFTER(J_MR2)
   /* Create hotplug thread */
   {
     mHotplugThread = new EmulatedCameraHotplugThread(getEmulatedCameraNum());
     mHotplugThread->run("EmulatedCameraHotplugThread");
   }
-#endif
 }
 
 EmulatedBaseCamera* EmulatedCameraFactory::getOrCreateFakeCamera(
@@ -94,18 +85,14 @@
       camera = new EmulatedFakeCamera(cameraId, is_back_facing,
                                       &HAL_MODULE_INFO_SYM.common);
       break;
-#if VSOC_PLATFORM_SDK_AFTER(J_MR2)
     case cvd::CameraDefinition::kHalV2:
       camera = new EmulatedFakeCamera2(cameraId, is_back_facing,
                                        &HAL_MODULE_INFO_SYM.common);
       break;
-#endif
-#if VSOC_PLATFORM_SDK_AFTER(L_MR1)
     case cvd::CameraDefinition::kHalV3:
       camera = new EmulatedFakeCamera3(cameraId, is_back_facing,
                                        &HAL_MODULE_INFO_SYM.common);
       break;
-#endif
     default:
       ALOGE("%s: Unsupported camera hal version requested: %d", __FUNCTION__,
             definition.hal_version);
@@ -136,12 +123,10 @@
     }
   }
 
-#if VSOC_PLATFORM_SDK_AFTER(J_MR2)
   if (mHotplugThread != NULL) {
     mHotplugThread->requestExit();
     mHotplugThread->join();
   }
-#endif
 }
 
 /****************************************************************************
@@ -174,7 +159,6 @@
   return camera->getCameraInfo(info);
 }
 
-#if VSOC_PLATFORM_SDK_AFTER(J_MR2)
 int EmulatedCameraFactory::setCallbacks(
     const camera_module_callbacks_t* callbacks) {
   ALOGV("%s: callbacks = %p", __FUNCTION__, callbacks);
@@ -189,7 +173,6 @@
 
   // No vendor tags defined for emulator yet, so not touching ops
 }
-#endif
 
 int EmulatedCameraFactory::setTorchMode(const char* camera_id, bool enabled) {
   ALOGV("%s: camera_id = %s, enabled =%d", __FUNCTION__, camera_id, enabled);
@@ -233,7 +216,6 @@
   return EmulatedCameraFactory::Instance().getCameraInfo(camera_id, info);
 }
 
-#if VSOC_PLATFORM_SDK_AFTER(J_MR2)
 int EmulatedCameraFactory::set_callbacks(
     const camera_module_callbacks_t* callbacks) {
   return EmulatedCameraFactory::Instance().setCallbacks(callbacks);
@@ -242,7 +224,6 @@
 void EmulatedCameraFactory::get_vendor_tag_ops(vendor_tag_ops_t* ops) {
   EmulatedCameraFactory::Instance().getVendorTagOps(ops);
 }
-#endif
 
 int EmulatedCameraFactory::open_legacy(const struct hw_module_t* /*module*/,
                                        const char* /*id*/,
@@ -272,7 +253,6 @@
    * Send the callback first to framework, THEN close the camera.
    */
 
-#if VSOC_PLATFORM_SDK_AFTER(J_MR2)
   if (newStatus == cam->getHotplugStatus()) {
     ALOGW("%s: Ignoring transition to the same status", __FUNCTION__);
     return;
@@ -288,7 +268,6 @@
   } else if (newStatus == CAMERA_DEVICE_STATUS_PRESENT) {
     cam->plugCamera();
   }
-#endif
 }
 
 void EmulatedCameraFactory::onTorchModeStatusChanged(int cameraId,
@@ -299,14 +278,12 @@
     return;
   }
 
-#if VSOC_PLATFORM_SDK_AFTER(L_MR1)
   const camera_module_callbacks_t* cb = mCallbacks;
   if (cb != NULL && cb->torch_mode_status_change != NULL) {
     char id[10];
     sprintf(id, "%d", cameraId);
     cb->torch_mode_status_change(cb, id, newStatus);
   }
-#endif
 }
 
 /********************************************************************************
@@ -315,6 +292,6 @@
 
 /* Entry point for camera HAL API. */
 struct hw_module_methods_t EmulatedCameraFactory::mCameraModuleMethods = {
-    VSOC_STATIC_INITIALIZER(open) EmulatedCameraFactory::device_open};
+    .open = EmulatedCameraFactory::device_open};
 
 }; /* namespace android */
diff --git a/guest/hals/camera/EmulatedCameraFactory.h b/guest/hals/camera/EmulatedCameraFactory.h
index 6eb122c..1c5b9cd 100644
--- a/guest/hals/camera/EmulatedCameraFactory.h
+++ b/guest/hals/camera/EmulatedCameraFactory.h
@@ -23,7 +23,6 @@
 #include "CameraConfiguration.h"
 #include "EmulatedBaseCamera.h"
 #include "common/libs/threads/cuttlefish_thread.h"
-#include "guest/libs/platform_support/api_level_fixes.h"
 
 namespace android {
 
@@ -84,7 +83,6 @@
    */
   int getCameraInfo(int camera_id, struct camera_info* info);
 
-#if VSOC_PLATFORM_SDK_AFTER(J_MR2)
   /* Sets emulated camera callbacks.
    * This method is called in response to camera_module_t::set_callbacks
    * callback.
@@ -96,7 +94,6 @@
    * callback.
    */
   void getVendorTagOps(vendor_tag_ops_t* ops);
-#endif
 
   int setTorchMode(const char* camera_id, bool enabled);
 
@@ -111,13 +108,11 @@
   /* camera_module_t::get_camera_info callback entry point. */
   static int get_camera_info(int camera_id, struct camera_info* info);
 
-#if VSOC_PLATFORM_SDK_AFTER(J_MR2)
   /* camera_module_t::set_callbacks callback entry point. */
   static int set_callbacks(const camera_module_callbacks_t* callbacks);
 
   /* camera_module_t::get_vendor_tag_ops callback entry point */
   static void get_vendor_tag_ops(vendor_tag_ops_t* ops);
-#endif
 
   /* camera_module_t::open_legacy callback entry point */
   static int open_legacy(const struct hw_module_t* module, const char* id,
@@ -174,13 +169,11 @@
   /* Guards access to mEmulatedCameras. */
   cvd::Mutex mEmulatedCamerasMutex;
 
-#if VSOC_PLATFORM_SDK_AFTER(J_MR2)
   /* Camera callbacks (for status changing) */
   const camera_module_callbacks_t* mCallbacks;
 
   /* Hotplug thread (to call onStatusChanged) */
   sp<EmulatedCameraHotplugThread> mHotplugThread;
-#endif
 
   /* Back- and front camera properties accessed from the vsoc device. */
   cvd::CameraConfiguration mCameraConfiguration;
diff --git a/guest/hals/camera/EmulatedCameraHal.cpp b/guest/hals/camera/EmulatedCameraHal.cpp
index 64271c9..2aba50a 100644
--- a/guest/hals/camera/EmulatedCameraHal.cpp
+++ b/guest/hals/camera/EmulatedCameraHal.cpp
@@ -24,52 +24,34 @@
  */
 
 #include "EmulatedCameraFactory.h"
-#include "guest/libs/platform_support/api_level_fixes.h"
 
 /*
  * Required HAL header.
  */
 camera_module_t HAL_MODULE_INFO_SYM = {
-    VSOC_STATIC_INITIALIZER(common){
-        VSOC_STATIC_INITIALIZER(tag) HARDWARE_MODULE_TAG,
-#if VSOC_PLATFORM_SDK_AFTER(L_MR1)
-        VSOC_STATIC_INITIALIZER(module_api_version)
+    .common = {
+        .tag = HARDWARE_MODULE_TAG,
+        .module_api_version =
             CAMERA_MODULE_API_VERSION_2_4,
-#elif VSOC_PLATFORM_SDK_AFTER(K)
-        VSOC_STATIC_INITIALIZER(module_api_version)
-            CAMERA_MODULE_API_VERSION_2_3,
-#elif VSOC_PLATFORM_SDK_AFTER(J_MR2)
-        VSOC_STATIC_INITIALIZER(module_api_version)
-            CAMERA_MODULE_API_VERSION_2_2,
-#else
-        VSOC_STATIC_INITIALIZER(module_api_version)
-            CAMERA_MODULE_API_VERSION_2_0,
-#endif
-        VSOC_STATIC_INITIALIZER(hal_api_version) HARDWARE_HAL_API_VERSION,
-        VSOC_STATIC_INITIALIZER(id) CAMERA_HARDWARE_MODULE_ID,
-        VSOC_STATIC_INITIALIZER(name) "Emulated Camera Module",
-        VSOC_STATIC_INITIALIZER(author) "The Android Open Source Project",
-        VSOC_STATIC_INITIALIZER(methods) &
+        .hal_api_version = HARDWARE_HAL_API_VERSION,
+        .id = CAMERA_HARDWARE_MODULE_ID,
+        .name = "Emulated Camera Module",
+        .author = "The Android Open Source Project",
+        .methods = &
             android::EmulatedCameraFactory::mCameraModuleMethods,
-        VSOC_STATIC_INITIALIZER(dso) NULL,
-        VSOC_STATIC_INITIALIZER(reserved){0},
+        .dso = NULL,
+        .reserved = {0},
     },
-    VSOC_STATIC_INITIALIZER(get_number_of_cameras)
+    .get_number_of_cameras =
         android::EmulatedCameraFactory::get_number_of_cameras,
-    VSOC_STATIC_INITIALIZER(get_camera_info)
+    .get_camera_info =
         android::EmulatedCameraFactory::get_camera_info,
-#if VSOC_PLATFORM_SDK_AFTER(J_MR2)
-    VSOC_STATIC_INITIALIZER(set_callbacks)
+    .set_callbacks =
         android::EmulatedCameraFactory::set_callbacks,
-    VSOC_STATIC_INITIALIZER(get_vendor_tag_ops)
+    .get_vendor_tag_ops =
         android::EmulatedCameraFactory::get_vendor_tag_ops,
-#endif
-#if VSOC_PLATFORM_SDK_AFTER(K)
-    VSOC_STATIC_INITIALIZER(open_legacy)
+    .open_legacy =
         android::EmulatedCameraFactory::open_legacy,
-#endif
-#if VSOC_PLATFORM_SDK_AFTER(L_MR1)
-    VSOC_STATIC_INITIALIZER(set_torch_mode)
+    .set_torch_mode =
         android::EmulatedCameraFactory::set_torch_mode,
-#endif
 };
diff --git a/guest/hals/camera/EmulatedFakeCamera2.cpp b/guest/hals/camera/EmulatedFakeCamera2.cpp
index 4d28a76..63a5c1a 100644
--- a/guest/hals/camera/EmulatedFakeCamera2.cpp
+++ b/guest/hals/camera/EmulatedFakeCamera2.cpp
@@ -19,6 +19,8 @@
  * functionality of an advanced fake camera.
  */
 
+#include <inttypes.h>
+
 #include <algorithm>
 #include <cstdint>
 #include <iterator>
@@ -31,7 +33,6 @@
 #include "EmulatedFakeCamera2.h"
 #include "GrallocModule.h"
 #include "common/libs/auto_resources/auto_resources.h"
-#include "guest/libs/platform_support/api_level_fixes.h"
 
 #define ERROR_CAMERA_NOT_PRESENT -EPIPE
 
@@ -44,9 +45,7 @@
 const int64_t SEC = MSEC * 1000LL;
 
 const uint32_t EmulatedFakeCamera2::kAvailableFormats[] = {
-#if VSOC_PLATFORM_SDK_AFTER(K)
     HAL_PIXEL_FORMAT_RAW16,
-#endif
     HAL_PIXEL_FORMAT_BLOB, HAL_PIXEL_FORMAT_RGBA_8888,
     //        HAL_PIXEL_FORMAT_YV12,
     HAL_PIXEL_FORMAT_YCrCb_420_SP};
@@ -401,12 +400,10 @@
   const uint32_t *availableSizes;
   size_t availableSizeCount;
   switch (format) {
-#if VSOC_PLATFORM_SDK_AFTER(K)
     case HAL_PIXEL_FORMAT_RAW16:
       availableSizes = &mAvailableRawSizes.front();
       availableSizeCount = mAvailableRawSizes.size();
       break;
-#endif
     case HAL_PIXEL_FORMAT_BLOB:
       availableSizes = &mAvailableJpegSizes.front();
       availableSizeCount = mAvailableJpegSizes.size();
@@ -436,7 +433,6 @@
   }
 
   switch (format) {
-#if VSOC_PLATFORM_SDK_AFTER(K)
     case HAL_PIXEL_FORMAT_RAW16:
       if (mRawStreamCount >= kMaxRawStreamCount) {
         ALOGE("%s: Cannot allocate another raw stream (%d already allocated)",
@@ -445,7 +441,6 @@
       }
       mRawStreamCount++;
       break;
-#endif
     case HAL_PIXEL_FORMAT_BLOB:
       if (mJpegStreamCount >= kMaxJpegStreamCount) {
         ALOGE("%s: Cannot allocate another JPEG stream (%d already allocated)",
@@ -544,11 +539,9 @@
   }
 
   switch (mStreams.valueAt(streamIndex).format) {
-#if VSOC_PLATFORM_SDK_AFTER(K)
     case HAL_PIXEL_FORMAT_RAW16:
       mRawStreamCount--;
       break;
-#endif
     case HAL_PIXEL_FORMAT_BLOB:
       mJpegStreamCount--;
       break;
@@ -1582,11 +1575,7 @@
   // disable all 3A
   if (mControlMode == ANDROID_CONTROL_MODE_OFF) {
     mEffectMode = ANDROID_CONTROL_EFFECT_MODE_OFF;
-#if VSOC_PLATFORM_SDK_AFTER(K)
     mSceneMode = ANDROID_CONTROL_SCENE_MODE_DISABLED;
-#else
-    mSceneMode = ANDROID_CONTROL_SCENE_MODE_UNSUPPORTED;
-#endif
     mAfMode = ANDROID_CONTROL_AF_MODE_OFF;
     mAeLock = ANDROID_CONTROL_AE_LOCK_ON;
     mAeMode = ANDROID_CONTROL_AE_MODE_OFF;
@@ -1603,13 +1592,8 @@
       READ_IF_OK(res, mode.data.u8[0], ANDROID_CONTROL_EFFECT_MODE_OFF);
 
   res = find_camera_metadata_entry(request, ANDROID_CONTROL_SCENE_MODE, &mode);
-#if VSOC_PLATFORM_SDK_AFTER(K)
   mSceneMode =
       READ_IF_OK(res, mode.data.u8[0], ANDROID_CONTROL_SCENE_MODE_DISABLED);
-#else
-  mSceneMode =
-      READ_IF_OK(res, mode.data.u8[0], ANDROID_CONTROL_SCENE_MODE_UNSUPPORTED);
-#endif
 
   res = find_camera_metadata_entry(request, ANDROID_CONTROL_AF_MODE, &mode);
   if (mAfMode != mode.data.u8[0]) {
@@ -2187,11 +2171,7 @@
   // android.control
 
   static const uint8_t availableSceneModes[] = {
-#if VSOC_PLATFORM_SDK_AFTER(K)
     ANDROID_CONTROL_SCENE_MODE_DISABLED
-#else
-    ANDROID_CONTROL_SCENE_MODE_UNSUPPORTED
-#endif
   };
   ADD_OR_SIZE(ANDROID_CONTROL_AVAILABLE_SCENE_MODES, availableSceneModes,
               sizeof(availableSceneModes));
diff --git a/guest/hals/camera/EmulatedFakeCamera3.cpp b/guest/hals/camera/EmulatedFakeCamera3.cpp
index 71caa42..f9d9628 100644
--- a/guest/hals/camera/EmulatedFakeCamera3.cpp
+++ b/guest/hals/camera/EmulatedFakeCamera3.cpp
@@ -20,6 +20,7 @@
  */
 
 #include <cstdint>
+#include <inttypes.h>
 
 //#define LOG_NDEBUG 0
 //#define LOG_NNDEBUG 0
@@ -205,11 +206,9 @@
   info->facing = mFacingBack ? CAMERA_FACING_BACK : CAMERA_FACING_FRONT;
   info->orientation =
       EmulatedCameraFactory::Instance().getFakeCameraOrientation();
-#if VSOC_PLATFORM_SDK_AFTER(L_MR1)
   info->resource_cost = 100;
   info->conflicting_devices = NULL;
   info->conflicting_devices_length = 0;
-#endif
   return EmulatedCamera3::getCameraInfo(info);
 }
 
diff --git a/guest/hals/camera/EmulatedFakeCamera3.h b/guest/hals/camera/EmulatedFakeCamera3.h
index c8d2529..d67662a 100644
--- a/guest/hals/camera/EmulatedFakeCamera3.h
+++ b/guest/hals/camera/EmulatedFakeCamera3.h
@@ -17,20 +17,14 @@
 #ifndef HW_EMULATOR_CAMERA_EMULATED_FAKE_CAMERA3_H
 #define HW_EMULATOR_CAMERA_EMULATED_FAKE_CAMERA3_H
 
-#include "guest/libs/platform_support/api_level_fixes.h"
-
 /**
  * Contains declaration of a class EmulatedCamera that encapsulates
  * functionality of a fake camera that implements version 3 of the camera device
  * interace.
  */
 
-#if VSOC_PLATFORM_SDK_BEFORE(O_MR1)
-#include <camera/CameraMetadata.h>
-#else
 #include <CameraMetadata.h>
 using ::android::hardware::camera::common::V1_0::helper::CameraMetadata;
-#endif
 
 #include <utils/List.h>
 #include <utils/Mutex.h>
diff --git a/guest/hals/camera/Exif.cpp b/guest/hals/camera/Exif.cpp
index 78e93a1..e57bb8c 100644
--- a/guest/hals/camera/Exif.cpp
+++ b/guest/hals/camera/Exif.cpp
@@ -22,15 +22,10 @@
 #include <math.h>
 #include <stdint.h>
 
-#include "guest/libs/platform_support/api_level_fixes.h"
-#if VSOC_PLATFORM_SDK_BEFORE(O_MR1)
-#include <camera/CameraParameters.h>
-#else
 #include <CameraParameters.h>
 
 using ::android::hardware::camera::common::V1_0::helper::CameraParameters;
 using ::android::hardware::camera::common::V1_0::helper::Size;
-#endif
 
 #include "Exif.h"
 
diff --git a/guest/hals/camera/Exif.h b/guest/hals/camera/Exif.h
index 8e994e0..4ea06e1 100644
--- a/guest/hals/camera/Exif.h
+++ b/guest/hals/camera/Exif.h
@@ -18,14 +18,9 @@
 #ifndef CUTTLEFISH_CAMERA_EXIF_H
 #define CUTTLEFISH_CAMERA_EXIF_H
 
-#include "guest/libs/platform_support/api_level_fixes.h"
-#if VSOC_PLATFORM_SDK_BEFORE(O_MR1)
-#include <camera/CameraParameters.h>
-#else
 #include <CameraParameters.h>
 
 using ::android::hardware::camera::common::V1_0::helper::CameraParameters;
-#endif
 
 struct _ExifData;
 typedef struct _ExifData ExifData;
diff --git a/guest/hals/camera/fake-pipeline2/Base.h b/guest/hals/camera/fake-pipeline2/Base.h
index 638a719..3cd1e15 100644
--- a/guest/hals/camera/fake-pipeline2/Base.h
+++ b/guest/hals/camera/fake-pipeline2/Base.h
@@ -22,11 +22,6 @@
 #ifndef HW_EMULATOR_CAMERA2_BASE_H
 #define HW_EMULATOR_CAMERA2_BASE_H
 
-#include "guest/libs/platform_support/api_level_fixes.h"
-
-#if VSOC_PLATFORM_SDK_BEFORE(O_MR1)
-#include <system/window.h>
-#endif
 #include <hardware/camera2.h>
 #include <utils/Vector.h>
 
diff --git a/guest/hals/camera/fake-pipeline2/Sensor.cpp b/guest/hals/camera/fake-pipeline2/Sensor.cpp
index 34efd10..f39bbbd 100644
--- a/guest/hals/camera/fake-pipeline2/Sensor.cpp
+++ b/guest/hals/camera/fake-pipeline2/Sensor.cpp
@@ -30,7 +30,6 @@
 #include <cstdlib>
 #include "../EmulatedFakeCamera2.h"
 #include "Sensor.h"
-#include "guest/libs/platform_support/api_level_fixes.h"
 #include "system/camera_metadata.h"
 
 namespace android {
@@ -309,11 +308,9 @@
           i, b.streamId, b.width, b.height, b.format, b.stride, b.buffer,
           b.img);
       switch (b.format) {
-#if VSOC_PLATFORM_SDK_AFTER(K)
         case HAL_PIXEL_FORMAT_RAW16:
           captureRaw(b.img, gain, b.stride);
           break;
-#endif
         case HAL_PIXEL_FORMAT_RGB_888:
           captureRGB(b.img, gain, b.stride);
           break;
diff --git a/guest/hals/gps/gps_vsoc.cpp b/guest/hals/gps/gps_vsoc.cpp
index b17401b..94bfce4 100644
--- a/guest/hals/gps/gps_vsoc.cpp
+++ b/guest/hals/gps/gps_vsoc.cpp
@@ -24,13 +24,13 @@
 #include <pthread.h>
 #include <stdint.h>
 #include <unistd.h>
+#include <inttypes.h>
 
 #include <log/log.h>
 #include <cutils/sockets.h>
 #include <hardware/gps.h>
 
 #include "guest/hals/gps/gps_thread.h"
-#include "guest/libs/platform_support/api_level_fixes.h"
 
 static GpsState _gps_state;
 
@@ -245,14 +245,14 @@
 }
 
 static struct hw_module_methods_t gps_module_methods = {
-    VSOC_STATIC_INITIALIZER(open) open_gps};
+    .open = open_gps};
 
 struct hw_module_t HAL_MODULE_INFO_SYM = {
-    VSOC_STATIC_INITIALIZER(tag) HARDWARE_MODULE_TAG,
-    VSOC_STATIC_INITIALIZER(version_major) 1,
-    VSOC_STATIC_INITIALIZER(version_minor) 0,
-    VSOC_STATIC_INITIALIZER(id) GPS_HARDWARE_MODULE_ID,
-    VSOC_STATIC_INITIALIZER(name) "GCE GPS Module",
-    VSOC_STATIC_INITIALIZER(author) "The Android Open Source Project",
-    VSOC_STATIC_INITIALIZER(methods) & gps_module_methods,
+    .tag = HARDWARE_MODULE_TAG,
+    .version_major = 1,
+    .version_minor = 0,
+    .id = GPS_HARDWARE_MODULE_ID,
+    .name = "GCE GPS Module",
+    .author = "The Android Open Source Project",
+    .methods = & gps_module_methods,
 };
diff --git a/guest/hals/gralloc/gralloc.cpp b/guest/hals/gralloc/gralloc.cpp
index 1026d19..bf672ee 100644
--- a/guest/hals/gralloc/gralloc.cpp
+++ b/guest/hals/gralloc/gralloc.cpp
@@ -19,8 +19,6 @@
 #include <log/log.h>
 #include <stdlib.h>
 
-#include "guest/libs/platform_support/api_level_fixes.h"
-
 #include "guest/hals/gralloc/gralloc_vsoc_priv.h"
 #include "guest/vsoc/lib/gralloc_region_view.h"
 
@@ -54,10 +52,8 @@
 
 inline int formatToBytesPerPixel(int format) {
   switch (format) {
-#if VSOC_PLATFORM_SDK_AFTER(N_MR1)
     case HAL_PIXEL_FORMAT_RGBA_FP16:
       return 8;
-#endif
     case HAL_PIXEL_FORMAT_RGBA_8888:
     case HAL_PIXEL_FORMAT_RGBX_8888:
     case HAL_PIXEL_FORMAT_BGRA_8888:
@@ -318,9 +314,7 @@
     .unlock = unlock,
     .lock_ycbcr = lock_ycbcr,
     .perform = NULL,
-#if VSOC_PLATFORM_SDK_AFTER(P)
     .validateBufferSize = NULL,
     .getTransportSize = NULL,
-#endif
   },
 };
diff --git a/guest/hals/gralloc/legacy/gralloc.cpp b/guest/hals/gralloc/legacy/gralloc.cpp
index 9bf8c97..2cdcb12 100644
--- a/guest/hals/gralloc/legacy/gralloc.cpp
+++ b/guest/hals/gralloc/legacy/gralloc.cpp
@@ -35,8 +35,6 @@
 #include <hardware/hardware.h>
 #include <hardware/gralloc.h>
 
-#include <guest/libs/platform_support/api_level_fixes.h>
-
 #include "common/libs/auto_resources/auto_resources.h"
 #include "common/vsoc/lib/screen_region_view.h"
 #include "gralloc_vsoc_priv.h"
@@ -172,37 +170,35 @@
 /*****************************************************************************/
 
 static struct hw_module_methods_t gralloc_module_methods = {
-  VSOC_STATIC_INITIALIZER(open) gralloc_device_open
+  .open = gralloc_device_open
 };
 
 struct private_module_t HAL_MODULE_INFO_SYM = {
-  VSOC_STATIC_INITIALIZER(base) {
-    VSOC_STATIC_INITIALIZER(common) {
-      VSOC_STATIC_INITIALIZER(tag) HARDWARE_MODULE_TAG,
+  .base = {
+    .common = {
+      .tag = HARDWARE_MODULE_TAG,
 #ifdef GRALLOC_MODULE_API_VERSION_0_2
-      VSOC_STATIC_INITIALIZER(version_major) GRALLOC_MODULE_API_VERSION_0_2,
+      .version_major = GRALLOC_MODULE_API_VERSION_0_2,
 #else
-      VSOC_STATIC_INITIALIZER(version_major) 1,
+      .version_major = 1,
 #endif
-      VSOC_STATIC_INITIALIZER(version_minor) 0,
-      VSOC_STATIC_INITIALIZER(id) GRALLOC_HARDWARE_MODULE_ID,
-      VSOC_STATIC_INITIALIZER(name) "VSOC X86 Graphics Memory Allocator Module",
-      VSOC_STATIC_INITIALIZER(author) "The Android Open Source Project",
-      VSOC_STATIC_INITIALIZER(methods) &gralloc_module_methods,
-      VSOC_STATIC_INITIALIZER(dso) NULL,
-      VSOC_STATIC_INITIALIZER(reserved) {0},
+      .version_minor = 0,
+      .id = GRALLOC_HARDWARE_MODULE_ID,
+      .name = "VSOC X86 Graphics Memory Allocator Module",
+      .author = "The Android Open Source Project",
+      .methods = &gralloc_module_methods,
+      .dso = NULL,
+      .reserved = {0},
     },
-    VSOC_STATIC_INITIALIZER(registerBuffer) gralloc_register_buffer,
-    VSOC_STATIC_INITIALIZER(unregisterBuffer) gralloc_unregister_buffer,
-    VSOC_STATIC_INITIALIZER(lock) gralloc_lock,
-    VSOC_STATIC_INITIALIZER(unlock) gralloc_unlock,
-#if VSOC_PLATFORM_SDK_AFTER(P)
-    VSOC_STATIC_INITIALIZER(validateBufferSize) NULL,
-    VSOC_STATIC_INITIALIZER(getTransportSize) NULL,
-#endif
+    .registerBuffer = gralloc_register_buffer,
+    .unregisterBuffer = gralloc_unregister_buffer,
+    .lock = gralloc_lock,
+    .unlock = gralloc_unlock,
+    .validateBufferSize = NULL,
+    .getTransportSize = NULL,
 #ifdef GRALLOC_MODULE_API_VERSION_0_2
-    VSOC_STATIC_INITIALIZER(perform) NULL,
-    VSOC_STATIC_INITIALIZER(lock_ycbcr) gralloc_lock_ycbcr,
+    .perform = NULL,
+    .lock_ycbcr = gralloc_lock_ycbcr,
 #endif
   },
 };
diff --git a/guest/hals/gralloc/legacy/gralloc_vsoc_priv.h b/guest/hals/gralloc/legacy/gralloc_vsoc_priv.h
index 16e2b33..8790321 100644
--- a/guest/hals/gralloc/legacy/gralloc_vsoc_priv.h
+++ b/guest/hals/gralloc/legacy/gralloc_vsoc_priv.h
@@ -30,7 +30,6 @@
 #include <linux/fb.h>
 
 #include "common/vsoc/lib/screen_region_view.h"
-#include "guest/libs/platform_support/api_level_fixes.h"
 
 #ifndef GRALLOC_MODULE_API_VERSION_0_2
 // This structure will be defined in later releases of Android. Declare it
@@ -153,18 +152,14 @@
 
 static inline int formatToBytesPerPixel(int format) {
   switch (format) {
-#if VSOC_PLATFORM_SDK_AFTER(N_MR1)
     case HAL_PIXEL_FORMAT_RGBA_FP16:
       return 8;
-#endif
     case HAL_PIXEL_FORMAT_RGBA_8888:
     case HAL_PIXEL_FORMAT_RGBX_8888:
     case HAL_PIXEL_FORMAT_BGRA_8888:
-#if VSOC_PLATFORM_SDK_AFTER(J)
     // The camera 3.0 implementation assumes that IMPLEMENTATION_DEFINED
     // means HAL_PIXEL_FORMAT_RGBA_8888
     case HAL_PIXEL_FORMAT_IMPLEMENTATION_DEFINED:
-#endif
       return 4;
     case HAL_PIXEL_FORMAT_RGB_888:
       return 3;
@@ -174,10 +169,8 @@
     case HAL_PIXEL_FORMAT_YCbCr_420_888:
 #endif
       return 2;
-#if VSOC_PLATFORM_SDK_AFTER(J)
     case HAL_PIXEL_FORMAT_BLOB:
       return 1;
-#endif
     default:
       ALOGE("%s: unknown format=%d", __FUNCTION__, format);
       return 8;
@@ -206,14 +199,11 @@
     case HAL_PIXEL_FORMAT_YCbCr_422_I:
       return "YCbCr_422_I";
 
-#if VSOC_PLATFORM_SDK_AFTER(J)
     // First supported on JBMR1 (API 17)
     case HAL_PIXEL_FORMAT_IMPLEMENTATION_DEFINED:
       return "IMPLEMENTATION_DEFINED";
     case HAL_PIXEL_FORMAT_BLOB:
       return "BLOB";
-#endif
-#if VSOC_PLATFORM_SDK_AFTER(J_MR1)
     // First supported on JBMR2 (API 18)
     case HAL_PIXEL_FORMAT_YCbCr_420_888:
       return "YCbCr_420_888";
@@ -221,8 +211,6 @@
       return "Y8";
     case HAL_PIXEL_FORMAT_Y16:
       return "Y16";
-#endif
-#if VSOC_PLATFORM_SDK_AFTER(K)
     // Support was added in L (API 21)
     case HAL_PIXEL_FORMAT_RAW_OPAQUE:
       return "RAW_OPAQUE";
@@ -231,8 +219,6 @@
       return "RAW16";
     case HAL_PIXEL_FORMAT_RAW10:
       return "RAW10";
-#endif
-#if VSOC_PLATFORM_SDK_AFTER(L_MR1)
     case HAL_PIXEL_FORMAT_YCbCr_444_888:
       return "YCbCr_444_888";
     case HAL_PIXEL_FORMAT_YCbCr_422_888:
@@ -243,33 +229,8 @@
       return "FLEX_RGBA_8888";
     case HAL_PIXEL_FORMAT_FLEX_RGB_888:
       return "FLEX_RGB_888";
-#endif
-#if VSOC_PLATFORM_SDK_AFTER(N_MR1)
     case HAL_PIXEL_FORMAT_RGBA_FP16:
       return "RGBA_FP16";
-#endif
-
-      // Formats that have been removed
-#if VSOC_PLATFORM_SDK_BEFORE(K)
-    // Support was dropped on K (API 19)
-    case HAL_PIXEL_FORMAT_RGBA_5551:
-      return "RGBA_5551";
-    case HAL_PIXEL_FORMAT_RGBA_4444:
-      return "RGBA_4444";
-#endif
-#if VSOC_PLATFORM_SDK_BEFORE(L)
-    // Renamed to RAW_16 in L. Both were present for L, but it was completely
-    // removed in M.
-    case HAL_PIXEL_FORMAT_RAW_SENSOR:
-      return "RAW_SENSOR";
-#endif
-#if VSOC_PLATFORM_SDK_AFTER(J_MR2) && VSOC_PLATFORM_SDK_BEFORE(M)
-    // Supported K, L, and LMR1. Not supported on JBMR0, JBMR1, JBMR2, and M
-    case HAL_PIXEL_FORMAT_sRGB_X_8888:
-      return "sRGB_X_8888";
-    case HAL_PIXEL_FORMAT_sRGB_A_8888:
-      return "sRGB_A_8888";
-#endif
   }
   return "UNKNOWN";
 }
@@ -307,14 +268,12 @@
   int y_size, c_size;
 
   switch (format) {
-#if VSOC_PLATFORM_SDK_AFTER(J)
     // BLOB is used to allocate buffers for JPEG formatted data. Bytes per pixel
     // is 1, the desired buffer size is in w, and h should be 1. We refrain from
     // adding additional padding, although the caller is likely to round
     // up to a page size.
     case HAL_PIXEL_FORMAT_BLOB:
       return bytes_per_pixel * w * h;
-#endif
     case HAL_PIXEL_FORMAT_YV12:
 #ifdef GRALLOC_MODULE_API_VERSION_0_2
     case HAL_PIXEL_FORMAT_YCbCr_420_888:
diff --git a/guest/hals/lights/lights_vsoc.c b/guest/hals/lights/lights_vsoc.c
index 25694e0..3cdb6c2 100644
--- a/guest/hals/lights/lights_vsoc.c
+++ b/guest/hals/lights/lights_vsoc.c
@@ -25,8 +25,6 @@
 #include <sys/types.h>
 #include <unistd.h>
 
-#include "guest/libs/platform_support/api_level_fixes.h"
-
 static int set_light(struct light_device_t* dev,
                      struct light_state_t const* state) {
   ALOGI("%s: dev %p state %p", __FUNCTION__, dev, state);
@@ -59,15 +57,15 @@
 }
 
 static struct hw_module_methods_t lights_module_methods = {
-    VSOC_STATIC_INITIALIZER(open) open_lights,
+    .open = open_lights,
 };
 
 struct hw_module_t HAL_MODULE_INFO_SYM = {
-    VSOC_STATIC_INITIALIZER(tag) HARDWARE_MODULE_TAG,
-    VSOC_STATIC_INITIALIZER(version_major) 1,
-    VSOC_STATIC_INITIALIZER(version_minor) 0,
-    VSOC_STATIC_INITIALIZER(id) LIGHTS_HARDWARE_MODULE_ID,
-    VSOC_STATIC_INITIALIZER(name) "Android GCE lights Module",
-    VSOC_STATIC_INITIALIZER(author) "Google",
-    VSOC_STATIC_INITIALIZER(methods) & lights_module_methods,
+    .tag = HARDWARE_MODULE_TAG,
+    .version_major = 1,
+    .version_minor = 0,
+    .id = LIGHTS_HARDWARE_MODULE_ID,
+    .name = "Android GCE lights Module",
+    .author = "Google",
+    .methods = & lights_module_methods,
 };
diff --git a/guest/hals/power/power.c b/guest/hals/power/power.c
index 5bd3b0a..35d5a11 100644
--- a/guest/hals/power/power.c
+++ b/guest/hals/power/power.c
@@ -25,32 +25,18 @@
 
 #include <hardware/hardware.h>
 #include <hardware/power.h>
-#include "guest/libs/platform_support/api_level_fixes.h"
 
 struct vsoc_power_module {
     struct power_module base;
     pthread_mutex_t lock;
 };
 
-
-#if VSOC_PLATFORM_SDK_AFTER(N_MR1)
-
 static void vsoc_power_set_feature(struct power_module __unused *module,
                                   feature_t __unused hint,
                                   int __unused state) {
     return;
 }
 
-#elif VSOC_PLATFORM_SDK_AFTER(L)
-
-static void vsoc_power_set_feature(struct power_module __unused *module,
-                                  power_hint_t __unused hint,
-                                  int __unused state) {
-    return;
-}
-
-#endif
-
 static void vsoc_power_hint(struct power_module __unused *module,
                            power_hint_t __unused hint,
                            void __unused *data) {
@@ -76,30 +62,28 @@
  * prior: frameworks/base/services/core/jni/com_android_server_power_PowerManagerService.cpp
  */
 static struct hw_module_methods_t power_module_methods = {
-    VSOC_STATIC_INITIALIZER(open) NULL
+    .open = NULL
 };
 
 
 struct vsoc_power_module HAL_MODULE_INFO_SYM = {
-  VSOC_STATIC_INITIALIZER(base) {
+  .base = {
     .common = {
-        VSOC_STATIC_INITIALIZER(tag) HARDWARE_MODULE_TAG,
-        VSOC_STATIC_INITIALIZER(module_api_version) POWER_MODULE_API_VERSION_0_2,
-        VSOC_STATIC_INITIALIZER(hal_api_version) HARDWARE_HAL_API_VERSION,
-        VSOC_STATIC_INITIALIZER(id) POWER_HARDWARE_MODULE_ID,
-        VSOC_STATIC_INITIALIZER(name) "VSoC Power HAL",
-        VSOC_STATIC_INITIALIZER(author) "The Android Open Source Project",
-        VSOC_STATIC_INITIALIZER(methods) &power_module_methods,
+        .tag = HARDWARE_MODULE_TAG,
+        .module_api_version = POWER_MODULE_API_VERSION_0_2,
+        .hal_api_version = HARDWARE_HAL_API_VERSION,
+        .id = POWER_HARDWARE_MODULE_ID,
+        .name = "VSoC Power HAL",
+        .author = "The Android Open Source Project",
+        .methods = &power_module_methods,
     },
-    VSOC_STATIC_INITIALIZER(init) vsoc_power_init,
-    VSOC_STATIC_INITIALIZER(setInteractive) vsoc_power_set_interactive,
-    VSOC_STATIC_INITIALIZER(powerHint) vsoc_power_hint,
+    .init = vsoc_power_init,
+    .setInteractive = vsoc_power_set_interactive,
+    .powerHint = vsoc_power_hint,
     // Before L_MR1 we don't have setFeature
-#if VSOC_PLATFORM_SDK_AFTER(L)
-    VSOC_STATIC_INITIALIZER(setFeature) vsoc_power_set_feature,
-#endif
+    .setFeature = vsoc_power_set_feature,
   },
 
-  VSOC_STATIC_INITIALIZER(lock) PTHREAD_MUTEX_INITIALIZER,
+  .lock = PTHREAD_MUTEX_INITIALIZER,
 };
 
diff --git a/guest/hals/ril/cuttlefish_ril.cpp b/guest/hals/ril/cuttlefish_ril.cpp
index 5e86ede..2053429 100644
--- a/guest/hals/ril/cuttlefish_ril.cpp
+++ b/guest/hals/ril/cuttlefish_ril.cpp
@@ -31,7 +31,6 @@
 #include "common/libs/net/netlink_client.h"
 #include "common/libs/net/network_interface.h"
 #include "common/libs/net/network_interface_manager.h"
-#include "guest/libs/platform_support/api_level_fixes.h"
 
 #define CUTTLEFISH_RIL_VERSION_STRING "Android Cuttlefish RIL 1.4"
 
@@ -42,11 +41,6 @@
 #define MDM_EVDO 0x08
 #define MDM_LTE 0x10
 
-#if VSOC_PLATFORM_SDK_BEFORE(K)
-#define RADIO_TECH_3GPP 1
-#define RADIO_TECH_3GPP2 2
-#endif
-
 typedef enum {
   SIM_ABSENT = 0,
   SIM_NOT_READY = 1,
@@ -153,13 +147,8 @@
 static bool gRilConnected = false;
 
 static int request_or_send_data_calllist(RIL_Token* t) {
-#if VSOC_PLATFORM_SDK_AFTER(N_MR1)
   RIL_Data_Call_Response_v11* responses =
       new RIL_Data_Call_Response_v11[gDataCalls.size()];
-#else
-  RIL_Data_Call_Response_v6* responses =
-      new RIL_Data_Call_Response_v6[gDataCalls.size()];
-#endif
 
   int index = 0;
 
@@ -195,10 +184,8 @@
       const_cast<char*>(global_ril_config->ril_address_and_prefix());
     responses[index].dnses = const_cast<char*>(global_ril_config->ril_dns());
     responses[index].gateways = const_cast<char*>(global_ril_config->ril_gateway());
-#if VSOC_PLATFORM_SDK_AFTER(N_MR1)
     responses[index].pcscf = (char*)"";
     responses[index].mtu = 1440;
-#endif
   }
 
   bool new_conn_state = (gDataCalls.size() > 0);
@@ -761,11 +748,7 @@
 static void request_signal_strength(void* /*data*/, size_t /*datalen*/,
                                     RIL_Token t) {
   // TODO(ender): possible to support newer APIs here.
-#if VSOC_PLATFORM_SDK_AFTER(N_MR1)
   RIL_SignalStrength_v10 strength;
-#else
-  RIL_SignalStrength_v6 strength;
-#endif
 
   gGatewaySignalStrength += (rand() % 3 - 1);
   gCDMASignalStrength += (rand() % 3 - 1);
@@ -973,7 +956,6 @@
   }
 }
 
-#if VSOC_PLATFORM_SDK_AFTER(L)
 static void request_get_radio_capability(RIL_Token t) {
   ALOGV("Requesting radio capability.");
   RIL_RadioCapability rc;
@@ -997,7 +979,6 @@
   // TODO(ender): do something about these numbers.
   gce_ril_env->OnRequestComplete(t, RIL_E_SUCCESS, rc, datalen);
 }
-#endif
 
 static void request_set_preferred_network_type(int /*request*/, void* data,
                                                size_t /*datalen*/,
@@ -1285,7 +1266,6 @@
 static const int gMaxConcurrentDataCalls = 4;
 static const int gMaxConcurrentStandbyConnections = 4;
 
-#if VSOC_PLATFORM_SDK_AFTER(K)
 static void request_hardware_config(RIL_Token t) {
   RIL_HardwareConfig hw_cfg[2];
 
@@ -1316,7 +1296,6 @@
 
   gce_ril_env->OnRequestComplete(t, RIL_E_SUCCESS, &hw_cfg, sizeof(hw_cfg));
 }
-#endif
 
 // 0 = Home network only, 1 = preferred networks only, 2 = all networks.
 static int gCdmaRoamingPreference = 2;
@@ -1378,7 +1357,6 @@
   gce_ril_env->OnRequestComplete(t, RIL_E_SUCCESS, NULL, 0);
 }
 
-#if VSOC_PLATFORM_SDK_AFTER(P)
 static void request_set_carrier_restrictions4(void* /*data*/,
                                               size_t /*datalen*/,
                                               RIL_Token t) {
@@ -1392,7 +1370,6 @@
   // Carrier restrictions are not supported on cuttlefish, as they are specific for locked devices
   gce_ril_env->OnRequestComplete(t, RIL_E_REQUEST_NOT_SUPPORTED, NULL, 0);
 }
-#endif
 
 static RIL_RadioState gce_ril_current_state() {
   ALOGV("Reporting radio state %d", gRadioPowerState);
@@ -1442,7 +1419,6 @@
   delete[] cells;
 }
 
-#if VSOC_PLATFORM_SDK_AFTER(J_MR1)
 static void request_get_cell_info_list(void* /*data*/, size_t /*datalen*/,
                                        RIL_Token t) {
   struct timespec now;
@@ -1453,11 +1429,7 @@
   clock_gettime(CLOCK_MONOTONIC, &now);
   curTime = now.tv_sec * 1000000000LL + now.tv_nsec;
 
-#if VSOC_PLATFORM_SDK_AFTER(N_MR1)
   RIL_CellInfo_v12 ci;
-#else
-  RIL_CellInfo ci;
-#endif
 
   if (isGSM()) {
     ci.cellInfoType = RIL_CELL_INFO_TYPE_GSM;
@@ -1479,7 +1451,6 @@
     gce_ril_env->OnRequestComplete(t, RIL_E_GENERIC_FAILURE, NULL, 0);
   }
 }
-#endif
 
 struct NetworkOperator {
   std::string long_name;
@@ -1509,11 +1480,7 @@
   gGSMNeighboringCells.resize(1);
   gGSMNeighboringCells[0].cid = (char*)"0000";
   gGSMNeighboringCells[0].rssi = 75;
-#if VSOC_PLATFORM_SDK_AFTER(O_MR1)
   gNetworkOperators["311740"] =
-#else
-  gNetworkOperators["310260"] =
-#endif
       NetworkOperator("Android Virtual Operator", "Android", true);
   gNetworkOperators["310300"] =
       NetworkOperator("Alternative Operator", "Alternative", true);
@@ -1644,7 +1611,6 @@
   //                                sizeof(response));
 }
 
-#if VSOC_PLATFORM_SDK_AFTER(J_MR1)
 static void request_set_cell_info_list_rate(void* data, size_t /*datalen*/,
                                             RIL_Token t) {
   // For now we'll save the rate but no RIL_UNSOL_CELL_INFO_LIST messages
@@ -1653,8 +1619,6 @@
   s_cell_info_rate_ms = ((int*)data)[0];
   gce_ril_env->OnRequestComplete(t, RIL_E_SUCCESS, NULL, 0);
 }
-#endif
-#if VSOC_PLATFORM_SDK_AFTER(J_MR2)
 static void request_ims_send_SMS(void* data, size_t /*datalen*/, RIL_Token t) {
   RIL_IMS_SMS_Message* args = (RIL_IMS_SMS_Message*)data;
   RIL_SMS_Response response{};
@@ -1675,7 +1639,6 @@
                                      sizeof(response));
   }
 }
-#endif
 
 static void request_SMS_acknowledge(void* data, size_t /*datalen*/,
                                     RIL_Token t) {
@@ -1904,11 +1867,7 @@
       // Transition directly to READY. Set default network operator.
       if (gRadioPowerState == RADIO_STATE_ON) {
         gSimStatus = SIM_READY;
-#if VSOC_PLATFORM_SDK_AFTER(O_MR1)
         gCurrentNetworkOperator = "311740";
-#else
-        gCurrentNetworkOperator = "310260";
-#endif
       }
 
       gce_ril_env->RequestTimedCallback(pollSIMState, NULL, &TIMEVAL_SIMPOLL);
@@ -2112,7 +2071,6 @@
   }
 }
 
-#if VSOC_PLATFORM_SDK_AFTER(K)
 static void request_sim_apdu(void* data, size_t /*datalen*/, RIL_Token t) {
   RIL_SIM_APDU* apdu = (RIL_SIM_APDU*)data;
 
@@ -2133,7 +2091,6 @@
     gce_ril_env->OnRequestComplete(t, RIL_E_GENERIC_FAILURE, NULL, 0);
   }
 }
-#endif
 
 // 0 = Lock is available, but disabled.
 // 1 = Lock is available and enabled,
@@ -2216,7 +2173,6 @@
 }
 
 // New functions after P.
-#if VSOC_PLATFORM_SDK_AFTER(P)
 static void request_start_network_scan(RIL_Token t) {
   ALOGV("Scanning network - void");
   gce_ril_env->OnRequestComplete(t, RIL_E_SUCCESS, NULL, 0);
@@ -2285,8 +2241,6 @@
   return;
 }
 
-#endif
-
 static void gce_ril_on_request(int request, void* data, size_t datalen,
                                RIL_Token t) {
   // Ignore all requests except RIL_REQUEST_GET_SIM_STATUS
@@ -2464,14 +2418,12 @@
     case RIL_REQUEST_GET_NEIGHBORING_CELL_IDS:
       request_get_neighboring_cell_ids(data, datalen, t);
       break;
-#if VSOC_PLATFORM_SDK_AFTER(J_MR1)
     case RIL_REQUEST_GET_CELL_INFO_LIST:
       request_get_cell_info_list(data, datalen, t);
       break;
     case RIL_REQUEST_SET_UNSOL_CELL_INFO_LIST_RATE:
       request_set_cell_info_list_rate(data, datalen, t);
       break;
-#endif
     case RIL_REQUEST_BASEBAND_VERSION:
       request_baseband_version(t);
       break;
@@ -2481,8 +2433,6 @@
     case RIL_REQUEST_QUERY_TTY_MODE:
       request_get_tty_mode(t);
       break;
-
-#if VSOC_PLATFORM_SDK_AFTER(L)
     case RIL_REQUEST_GET_RADIO_CAPABILITY:
       request_get_radio_capability(t);
       break;
@@ -2492,8 +2442,6 @@
     case RIL_REQUEST_SET_DATA_PROFILE:
       gce_ril_env->OnRequestComplete(t, RIL_E_SUCCESS, NULL, 0);
       break;
-#endif
-#if VSOC_PLATFORM_SDK_AFTER(K)
     case RIL_REQUEST_GET_HARDWARE_CONFIG:
       request_hardware_config(t);
       break;
@@ -2509,8 +2457,6 @@
     case RIL_REQUEST_SIM_CLOSE_CHANNEL:
       request_sim_close_channel(data, datalen, t);
       break;
-#endif
-#if VSOC_PLATFORM_SDK_AFTER(J_MR2)
     case RIL_REQUEST_IMS_SEND_SMS:
       request_ims_send_SMS(data, datalen, t);
       break;
@@ -2520,10 +2466,7 @@
       gce_ril_env->OnRequestComplete(t, RIL_E_SUCCESS, NULL, 0);
       break;
 
-#endif
-
 // New requests after P.
-#if VSOC_PLATFORM_SDK_AFTER(P)
     case RIL_REQUEST_START_NETWORK_SCAN:
       request_start_network_scan(t);
       break;
@@ -2557,7 +2500,6 @@
     case RIL_REQUEST_GET_CARRIER_RESTRICTIONS_1_4:
       request_get_carrier_restrictions4(t);
       break;
-#endif
     case RIL_REQUEST_REPORT_STK_SERVICE_IS_RUNNING:
       gce_ril_env->OnRequestComplete(t, RIL_E_SUCCESS, NULL, 0);
       break;
diff --git a/guest/hals/ril/cuttlefish_ril.h b/guest/hals/ril/cuttlefish_ril.h
index 10340d8..97d4ae1 100644
--- a/guest/hals/ril/cuttlefish_ril.h
+++ b/guest/hals/ril/cuttlefish_ril.h
@@ -25,12 +25,6 @@
 #include <stdlib.h>
 #include <sys/time.h>
 
-// Start to use and maintain the local ril.h file from Q.
-#include "guest/libs/platform_support/api_level_fixes.h"
-#if VSOC_PLATFORM_SDK_BEFORE(Q)
-#include <telephony/ril.h>
-#else
 #include <guest/hals/ril/libril/ril.h>
-#endif
 
 #include <telephony/ril_cdma_sms.h>
\ No newline at end of file
diff --git a/guest/hals/sensors/sensors.h b/guest/hals/sensors/sensors.h
index c4305ce..9543e4e 100644
--- a/guest/hals/sensors/sensors.h
+++ b/guest/hals/sensors/sensors.h
@@ -17,7 +17,6 @@
 
 #include "common/libs/time/monotonic_time.h"
 #include "guest/hals/sensors/sensors_hal.h"
-#include "guest/libs/platform_support/api_level_fixes.h"
 
 namespace cvd {
 
@@ -172,7 +171,6 @@
 
 // Type of this sensor, represented as a string.
 
-#if VSOC_SENSORS_DEVICE_API_VERSION_ATLEAST(1_2)
 const char kAccelerometerStringType[] = SENSOR_STRING_TYPE_ACCELEROMETER;
 const char kGyroscopeStringType[] = SENSOR_STRING_TYPE_GYROSCOPE;
 const char kLightStringType[] = SENSOR_STRING_TYPE_LIGHT;
@@ -182,19 +180,7 @@
 const char kAmbientTempStringType[] = SENSOR_STRING_TYPE_AMBIENT_TEMPERATURE;
 const char kDeviceTempStringType[] = SENSOR_STRING_TYPE_TEMPERATURE;
 const char kRelativeHumidityStringType[] = SENSOR_STRING_TYPE_RELATIVE_HUMIDITY;
-#else
-const char kAccelerometerStringType[] = "";
-const char kGyroscopeStringType[] = "";
-const char kLightStringType[] = "";
-const char kMagneticFieldStringType[] = "";
-const char kPressureStringType[] = "";
-const char kProximityStringType[] = "";
-const char kAmbientTempStringType[] = "";
-const char kDeviceTempStringType[] = "";
-const char kRelativeHumidityStringType[] = "";
-#endif
 
-#if VSOC_SENSORS_DEVICE_API_VERSION_ATLEAST(1_3)
 const uint32_t kAccelerometerReportingMode = SENSOR_FLAG_CONTINUOUS_MODE;
 const uint32_t kGyroscopeReportingMode = SENSOR_FLAG_CONTINUOUS_MODE;
 const uint32_t kLightReportingMode = SENSOR_FLAG_ON_CHANGE_MODE;
@@ -204,17 +190,6 @@
 const uint32_t kAmbientTempReportingMode = SENSOR_FLAG_ON_CHANGE_MODE;
 const uint32_t kDeviceTempReportingMode = SENSOR_FLAG_ON_CHANGE_MODE;
 const uint32_t kRelativeHumidityReportingMode = SENSOR_FLAG_ON_CHANGE_MODE;
-#else
-const uint32_t kAccelerometerReportingMode = 0;
-const uint32_t kGyroscopeReportingMode = 0;
-const uint32_t kLightReportingMode = 0;
-const uint32_t kMagneticFieldReportingMode = 0;
-const uint32_t kPressureReportingMode = 0;
-const uint32_t kProximityReportingMode = 0;
-const uint32_t kAmbientTempReportingMode = 0;
-const uint32_t kDeviceTempReportingMode = 0;
-const uint32_t kRelativeHumidityReportingMode = 0;
-#endif
 
 const bool kAccelerometerIsWakeup = false;
 const bool kGyroscopeIsWakeup = false;
diff --git a/guest/hals/sensors/sensors_hal.cpp b/guest/hals/sensors/sensors_hal.cpp
index 4761d3d..c1e2284 100644
--- a/guest/hals/sensors/sensors_hal.cpp
+++ b/guest/hals/sensors/sensors_hal.cpp
@@ -16,24 +16,21 @@
 #include "guest/hals/sensors/sensors_hal.h"
 
 #include "guest/hals/sensors/vsoc_sensors.h"
-#include "guest/libs/platform_support/api_level_fixes.h"
 
 static hw_module_methods_t hal_module_methods = {
-  VSOC_STATIC_INITIALIZER(open) cvd::GceSensors::Open,
+  .open = cvd::GceSensors::Open,
 };
 
 sensors_module_t HAL_MODULE_INFO_SYM = {
-  VSOC_STATIC_INITIALIZER(common){
-    VSOC_STATIC_INITIALIZER(tag) HARDWARE_MODULE_TAG,
-    VSOC_STATIC_INITIALIZER(module_api_version) 1,
-    VSOC_STATIC_INITIALIZER(hal_api_version) 0,
-    VSOC_STATIC_INITIALIZER(id) SENSORS_HARDWARE_MODULE_ID,
-    VSOC_STATIC_INITIALIZER(name) "Android-GCE SENSORS Module",
-    VSOC_STATIC_INITIALIZER(author) "Google",
-    VSOC_STATIC_INITIALIZER(methods) & hal_module_methods,
+  .common = {
+    .tag = HARDWARE_MODULE_TAG,
+    .module_api_version = 1,
+    .hal_api_version = 0,
+    .id = SENSORS_HARDWARE_MODULE_ID,
+    .name = "Android-GCE SENSORS Module",
+    .author = "Google",
+    .methods = & hal_module_methods,
   },
-  VSOC_STATIC_INITIALIZER(get_sensors_list) cvd::GceSensors::GetSensorsList,
-#if VSOC_SENSORS_DEVICE_API_VERSION_ATLEAST(1_4)
-  VSOC_STATIC_INITIALIZER(set_operation_mode) cvd::GceSensors::SetOperationMode,
-#endif
+  .get_sensors_list = cvd::GceSensors::GetSensorsList,
+  .set_operation_mode = cvd::GceSensors::SetOperationMode,
 };
diff --git a/guest/hals/sensors/sensors_hal.h b/guest/hals/sensors/sensors_hal.h
index 5e38a1f..263bf09 100644
--- a/guest/hals/sensors/sensors_hal.h
+++ b/guest/hals/sensors/sensors_hal.h
@@ -19,21 +19,7 @@
 #include <hardware/hardware.h>
 #include <hardware/sensors.h>
 
-#include "guest/libs/platform_support/api_level_fixes.h"
-
-#if VSOC_PLATFORM_SDK_BEFORE(K)
-#define VSOC_SENSOR_DEVICE_VERSION HARDWARE_MAKE_API_VERSION(0, 1)
-#elif VSOC_PLATFORM_SDK_BEFORE(L)
-#define VSOC_SENSOR_DEVICE_VERSION SENSORS_DEVICE_API_VERSION_1_1
-#elif VSOC_PLATFORM_SDK_BEFORE(M)
-#define VSOC_SENSOR_DEVICE_VERSION SENSORS_DEVICE_API_VERSION_1_3
-#else
 #define VSOC_SENSOR_DEVICE_VERSION SENSORS_DEVICE_API_VERSION_1_4
-#endif
-
-#define VSOC_SENSORS_DEVICE_API_VERSION_ATLEAST(X) \
-    (defined (SENSORS_DEVICE_API_VERSION_##X) && \
-     (VSOC_SENSOR_DEVICE_VERSION >= SENSORS_DEVICE_API_VERSION_##X))
 
 #define SENSORS_DEBUG 0
 
diff --git a/guest/hals/sensors/vsoc_sensors.cpp b/guest/hals/sensors/vsoc_sensors.cpp
index 336cd65..c9388b0 100644
--- a/guest/hals/sensors/vsoc_sensors.cpp
+++ b/guest/hals/sensors/vsoc_sensors.cpp
@@ -29,7 +29,6 @@
 #include "guest/hals/sensors/sensors_hal.h"
 #include "guest/hals/sensors/vsoc_sensors.h"
 #include "guest/hals/sensors/vsoc_sensors_message.h"
-#include "guest/libs/platform_support/api_level_fixes.h"
 #include "guest/libs/remoter/remoter_framework_pkt.h"
 
 using cvd::LockGuard;
@@ -105,17 +104,11 @@
     rval->poll = cvd::thunk<sensors_poll_device_t, &GceSensors::Poll>;
     rval->activate = cvd::thunk<sensors_poll_device_t, &GceSensors::Activate>;
     rval->setDelay = cvd::thunk<sensors_poll_device_t, &GceSensors::SetDelay>;
-#if VSOC_SENSORS_DEVICE_API_VERSION_ATLEAST(1_0)
 
     rval->batch = cvd::thunk<sensors_poll_device_1, &GceSensors::Batch>;
-#endif
-#if VSOC_SENSORS_DEVICE_API_VERSION_ATLEAST(1_1)
     rval->flush = cvd::thunk<sensors_poll_device_1, &GceSensors::Flush>;
-#endif
-#if VSOC_SENSORS_DEVICE_API_VERSION_ATLEAST(1_4)
     rval->inject_sensor_data =
         cvd::thunk<sensors_poll_device_1, &GceSensors::InjectSensorData>;
-#endif
 
     // Spawn a thread to listen for incoming data from the remoter.
     int err = pthread_create(
diff --git a/guest/libs/platform_support/api_level_fixes.h b/guest/libs/platform_support/api_level_fixes.h
deleted file mode 100644
index c49a8c2..0000000
--- a/guest/libs/platform_support/api_level_fixes.h
+++ /dev/null
@@ -1,118 +0,0 @@
-/*
- * Copyright (C) 2017 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-#pragma once
-
-// Fixes for various things that go wrong between Android versions.
-// By convention this should be the very first include: it tweaks some
-// flags that affect the processing of the system headers.
-//
-// Code that needs to cope with platform changes should use the
-// VSOC_PLATFORM_SDK_BEFORE and VSOC_PLATFORM_SDK_AFTER macros below.
-// It's fine to provide declarations for broadly used things in this file
-// if that's easier.
-//
-// To use this header add $(VSOC_VERSION_CFLAGS) to the LOCAL_CFLAGS
-// in the corresponding Android.mk. There is an error check to catch
-// cases where this wasn't done.
-//
-// Code should not examine the SDK_PLATFORM_VERSION, and generally shouldn't
-// look at the VSOC_PLATFORM_SDK_* values. While these currently track
-// PLATFORM_SDK_VERSION, that's an implementation detail that will probably
-// change: Android will eventually break things without bumping
-// PLATFORM_SDK_VERSION.
-//
-// This is also why there is no SDK_PLATFORM_VERSION_IS(). Convert these
-// statements into BEFORE and/or AFTER.
-//
-// To check for master/AOSP use VSOC_PLATFORM_VERSION_AFTER(LAST_SHIPPED)
-#include <time.h>
-
-#ifndef VSOC_PLATFORM_SDK_VERSION
-#include "platform_version.h"
-#endif
-
-#ifndef VSOC_PLATFORM_SDK_VERSION
-#error VSOC_PLATFORM_SDK_VERSION is not set. Check your Android.mk
-#endif
-
-// Hide some C++ annotations that we'd like to use but need to avoid on older
-// compilers.
-#if __cplusplus <= 199711L
-#define override
-#endif
-
-#define VSOC_PLATFORM_SDK_J                16
-#define VSOC_PLATFORM_SDK_J_MR1            17
-#define VSOC_PLATFORM_SDK_J_MR2            18
-#define VSOC_PLATFORM_SDK_K                19
-// Version 20 reserved for KitKat wearables only. See
-// http://developer.android.com/guide/topics/manifest/uses-sdk-element.html
-#define VSOC_PLATFORM_SDK_L                21
-#define VSOC_PLATFORM_SDK_L_MR1            22
-#define VSOC_PLATFORM_SDK_M                23
-#define VSOC_PLATFORM_SDK_N                24
-#define VSOC_PLATFORM_SDK_N_MR1            25
-#define VSOC_PLATFORM_SDK_O                26
-#define VSOC_PLATFORM_SDK_O_MR1            27
-#define VSOC_PLATFORM_SDK_P                28
-#define VSOC_PLATFORM_SDK_Q                29
-#define VSOC_PLATFORM_SDK_LAST_SHIPPED     28
-
-#define VSOC_PLATFORM_SDK_BEFORE(X) (VSOC_PLATFORM_SDK_VERSION < VSOC_PLATFORM_SDK_##X)
-#define VSOC_PLATFORM_SDK_AFTER(X) (VSOC_PLATFORM_SDK_VERSION > VSOC_PLATFORM_SDK_##X)
-
-#if VSOC_PLATFORM_SDK_BEFORE(J_MR2)
-#define VSOC_STATIC_INITIALIZER(X) X:
-#else
-#define VSOC_STATIC_INITIALIZER(X) .X =
-#endif
-
-#if VSOC_PLATFORM_SDK_BEFORE(K)
-// audio_input_flags_t was first defind in K.
-// JBMR2 and K use the same audio HAL version, so define a work-around here.
-typedef enum {
-  AUDIO_INPUT_FLAG_NONE       = 0x0,  // no attributes
-} audio_input_flags_t;
-#endif
-
-// cstdint doesn't provide PRI... before C++11. On some branches (K) inttypes.h
-// also doesn't behave as if it's C++. Just define the PRI... types here
-// the kludgy way so our source is clean from a C++11 point-of-view.
-#ifndef __STDC_FORMAT_MACROS
-#define __STDC_FORMAT_MACROS 1
-#endif
-#include <inttypes.h>
-
-#if VSOC_PLATFORM_SDK_BEFORE(L)
-#define HAL_PIXEL_FORMAT_RAW16 HAL_PIXEL_FORMAT_RAW_SENSOR
-#define VSOC_FDPRINTF fdprintf
-
-#define KLOG_ERROR_LEVEL   3
-#define KLOG_WARNING_LEVEL 4
-#define KLOG_NOTICE_LEVEL  5
-#define KLOG_INFO_LEVEL    6
-#define KLOG_DEBUG_LEVEL   7
-
-#else
-#define VSOC_FDPRINTF dprintf
-#endif
-
-#if VSOC_PLATFORM_SDK_BEFORE(M)
-__BEGIN_DECLS
-extern int clock_nanosleep(clockid_t, int, const struct timespec*,
-                             struct timespec*);
-__END_DECLS
-#endif