libhidladapter: Support for HIDL adapters
A HIDL adapter takes an x.(y+1) interface and registers
it as an x.y interface for testing.
This library allows someone or something to run an adapter.
Note: this requires b/62303973 to properly mock a lower interface version.
Note: this requires adapters to run as root to get around sepolicy.
Bug: 37518178
Test: can switch out implementations
~/android/master$ lshal | grep hidl.allocator
Y android.hidl.allocator@1.0::IAllocator/ashmem 0/1 652 471
~/android/master$ lshal | grep hidl.allocator
Y android.hidl.allocator@1.0::IAllocator/ashmem 0/1 7635 471
~/android/master$ lshal | grep hidl.allocator
Y android.hidl.allocator@1.0::IAllocator/ashmem 0/1 652 471
Change-Id: Ic72feb3a2fd4649e67b396c33b9a292e9c0a944a
diff --git a/base/include/hidl/Status.h b/base/include/hidl/Status.h
index e2aab3f..1a2ef6d 100644
--- a/base/include/hidl/Status.h
+++ b/base/include/hidl/Status.h
@@ -155,6 +155,11 @@
~return_status();
+ bool isOkUnchecked() const {
+ // someone else will have to check
+ return mStatus.isOk();
+ }
+
bool isOk() const {
mCheckedStatus = true;
return mStatus.isOk();