Merge "libbinder: Consider 'VNDK + APEX' as system stable" am: 7f10d41dc3
am: eb9c8baef8
Change-Id: I463a1369e226b1b4f850a778d8c83e3cbd5f789b
diff --git a/libs/binder/Parcel.cpp b/libs/binder/Parcel.cpp
index 93e6c5f..e5c7d74 100644
--- a/libs/binder/Parcel.cpp
+++ b/libs/binder/Parcel.cpp
@@ -509,7 +509,7 @@
}
}
-#ifdef __ANDROID_VNDK__
+#if defined(__ANDROID_VNDK__) && !defined(__ANDROID_APEX__)
constexpr int32_t kHeader = B_PACK_CHARS('V', 'N', 'D', 'R');
#else
constexpr int32_t kHeader = B_PACK_CHARS('S', 'Y', 'S', 'T');
diff --git a/libs/binder/include/binder/Stability.h b/libs/binder/include/binder/Stability.h
index b84657a..2894482 100644
--- a/libs/binder/include/binder/Stability.h
+++ b/libs/binder/include/binder/Stability.h
@@ -81,7 +81,7 @@
VINTF = 0b111111,
};
-#ifdef __ANDROID_VNDK__
+#if defined(__ANDROID_VNDK__) && !defined(__ANDROID_APEX__)
static constexpr Level kLocalStability = Level::VENDOR;
#else
static constexpr Level kLocalStability = Level::SYSTEM;
diff --git a/libs/binder/ndk/include_platform/android/binder_stability.h b/libs/binder/ndk/include_platform/android/binder_stability.h
index e6aeb04..b03fce1 100644
--- a/libs/binder/ndk/include_platform/android/binder_stability.h
+++ b/libs/binder/ndk/include_platform/android/binder_stability.h
@@ -20,7 +20,7 @@
__BEGIN_DECLS
-#ifdef __ANDROID_VNDK__
+#if defined(__ANDROID_VNDK__) && !defined(__ANDROID_APEX__)
/**
* This interface has the stability of the vendor image.
@@ -31,7 +31,7 @@
AIBinder_markVendorStability(binder);
}
-#else // ndef defined __ANDROID_VNDK__
+#else // defined(__ANDROID_VNDK__) && !defined(__ANDROID_APEX__)
/**
* This interface has the stability of the system image.
@@ -42,7 +42,7 @@
AIBinder_markSystemStability(binder);
}
-#endif // ifdef __ANDROID_VNDK__
+#endif // defined(__ANDROID_VNDK__) && !defined(__ANDROID_APEX__)
/**
* This interface has system<->vendor stability