Fix ~HidlMemory
The ~HidlMemory is used to work around the weak vtable problem.
Set its permission as public to avoid side effect.
Bug: 67758915
Test: compile sailfish in aosp
Change-Id: If51eacfce72aecc5f50372126c0a86994b54c076
diff --git a/base/include/hidl/HidlSupport.h b/base/include/hidl/HidlSupport.h
index 2be97c2..e60f2f3 100644
--- a/base/include/hidl/HidlSupport.h
+++ b/base/include/hidl/HidlSupport.h
@@ -303,11 +303,11 @@
// destructor
static sp<HidlMemory> getInstance(const hidl_string& name, int fd, uint64_t size);
+ virtual ~HidlMemory();
protected:
HidlMemory() : hidl_memory() {}
HidlMemory(const hidl_string& name, hidl_handle&& handle, size_t size)
: hidl_memory(name, std::move(handle), size) {}
- ~HidlMemory();
HidlMemory& operator=(hidl_memory&& src) {
hidl_memory::operator=(src);
return *this;