Keep Parcel size stable.
The size of 32-bit on arm 'Parcel' was accidentally changed. Fix this by
making stability 16-bits (there is not enough space in Parcel right now
to keep the 32-bit mask without combining some of the bools). This broke
a device in internal master with some 32-bit prebuilts.
Bug: 137348710
Test: TH
Test: boots on hawk
Change-Id: Ifd9aa07ae359557ff94b600c1b64bb565be85dc2
diff --git a/libs/binder/Parcel.cpp b/libs/binder/Parcel.cpp
index 0b9849a..ba44c66 100644
--- a/libs/binder/Parcel.cpp
+++ b/libs/binder/Parcel.cpp
@@ -77,6 +77,9 @@
namespace android {
+// many things compile this into prebuilts on the stack
+static_assert(sizeof(Parcel) == 60 || sizeof(Parcel) == 120);
+
static pthread_mutex_t gParcelGlobalAllocSizeLock = PTHREAD_MUTEX_INITIALIZER;
static size_t gParcelGlobalAllocSize = 0;
static size_t gParcelGlobalAllocCount = 0;
diff --git a/libs/binder/include/binder/Stability.h b/libs/binder/include/binder/Stability.h
index 77f0667..487f480 100644
--- a/libs/binder/include/binder/Stability.h
+++ b/libs/binder/include/binder/Stability.h
@@ -45,7 +45,7 @@
// up the efficiency level of a binder object. So, we expose the underlying type.
friend ::android::Parcel;
- enum Level : int32_t {
+ enum Level : int16_t {
UNDECLARED = 0,
VENDOR = 0b000011,