libbinder: avoid BpBinder subclasses
Being able to modify sizeof(BpBinder) at our discretion is very
important in order to prevent additional heap allocations. No one tends
to subclass this, because they are always created by Parcel, but at the
same time, we don't need to expose this possibility.
Bug: 167966510
Test: build only
Change-Id: I30c813d3de91043c46d235448fce41bac8fe5621
diff --git a/libs/binder/include/binder/BpBinder.h b/libs/binder/include/binder/BpBinder.h
index 095ec8f..a0e28d2 100644
--- a/libs/binder/include/binder/BpBinder.h
+++ b/libs/binder/include/binder/BpBinder.h
@@ -109,15 +109,13 @@
KeyedVector<const void*, entry_t> mObjects;
};
-protected:
+private:
BpBinder(int32_t handle,int32_t trackedUid);
virtual ~BpBinder();
virtual void onFirstRef();
virtual void onLastStrongRef(const void* id);
virtual bool onIncStrongAttempted(uint32_t flags, const void* id);
-private:
-
friend ::android::internal::Stability;
int32_t mStability;