Minor updates to api_level_fixes
This change replaces references to GCE with VSOC and updates copyright
notice.
Change-Id: Ic7be95cc9e0437009ceb462abdb22c782b169e4d
diff --git a/guest/libs/platform_support/api_level_fixes.h b/guest/libs/platform_support/api_level_fixes.h
index 58407a2..4604b26 100644
--- a/guest/libs/platform_support/api_level_fixes.h
+++ b/guest/libs/platform_support/api_level_fixes.h
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2016 The Android Open Source Project
+ * 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.
@@ -13,24 +13,23 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-#ifndef GCE_API_LEVEL_FIXES
-#define GCE_API_LEVEL_FIXES
+#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
-// GCE_PLATFORM_SDK_BEFORE and GCE_PLATFORM_SDK_AFTER macros below.
+// 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 $(GCE_VERSION_CFLAGS) to the LOCAL_CFLAGS
+// 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 GCE_PLATFORM_SDK_* values. While these currently track
+// 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.
@@ -38,11 +37,11 @@
// 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 GCE_PLATFORM_VERSION_AFTER(LAST_SHIPPED)
+// To check for master/AOSP use VSOC_PLATFORM_VERSION_AFTER(LAST_SHIPPED)
#include <time.h>
-#ifndef GCE_PLATFORM_SDK_VERSION
-#error GCE_PLATFORM_SDK_VERSION is not set. Check your Android.mk
+#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
@@ -51,29 +50,29 @@
#define override
#endif
-#define GCE_PLATFORM_SDK_J 16
-#define GCE_PLATFORM_SDK_J_MR1 17
-#define GCE_PLATFORM_SDK_J_MR2 18
-#define GCE_PLATFORM_SDK_K 19
+#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 GCE_PLATFORM_SDK_L 21
-#define GCE_PLATFORM_SDK_L_MR1 22
-#define GCE_PLATFORM_SDK_M 23
-#define GCE_PLATFORM_SDK_N 24
-#define GCE_PLATFORM_SDK_N_MR1 25
-#define GCE_PLATFORM_SDK_LAST_SHIPPED 25
+#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_LAST_SHIPPED 25
-#define GCE_PLATFORM_SDK_BEFORE(X) (GCE_PLATFORM_SDK_VERSION < GCE_PLATFORM_SDK_##X)
-#define GCE_PLATFORM_SDK_AFTER(X) (GCE_PLATFORM_SDK_VERSION > GCE_PLATFORM_SDK_##X)
+#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 GCE_PLATFORM_SDK_BEFORE(J_MR2)
-#define GCE_STATIC_INITIALIZER(X) X:
+#if VSOC_PLATFORM_SDK_BEFORE(J_MR2)
+#define VSOC_STATIC_INITIALIZER(X) X:
#else
-#define GCE_STATIC_INITIALIZER(X) .X =
+#define VSOC_STATIC_INITIALIZER(X) .X =
#endif
-#if GCE_PLATFORM_SDK_BEFORE(K)
+#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 {
@@ -89,9 +88,9 @@
#endif
#include <inttypes.h>
-#if GCE_PLATFORM_SDK_BEFORE(L)
+#if VSOC_PLATFORM_SDK_BEFORE(L)
#define HAL_PIXEL_FORMAT_RAW16 HAL_PIXEL_FORMAT_RAW_SENSOR
-#define GCE_FDPRINTF fdprintf
+#define VSOC_FDPRINTF fdprintf
#define KLOG_ERROR_LEVEL 3
#define KLOG_WARNING_LEVEL 4
@@ -100,14 +99,12 @@
#define KLOG_DEBUG_LEVEL 7
#else
-#define GCE_FDPRINTF dprintf
+#define VSOC_FDPRINTF dprintf
#endif
-#if GCE_PLATFORM_SDK_BEFORE(M)
+#if VSOC_PLATFORM_SDK_BEFORE(M)
__BEGIN_DECLS
extern int clock_nanosleep(clockid_t, int, const struct timespec*,
struct timespec*);
__END_DECLS
#endif
-
-#endif // GCE_API_LEVEL_FIXES