summaryrefslogtreecommitdiff
path: root/libs/binder/ndk/ibinder_internal.h
diff options
context:
space:
mode:
Diffstat (limited to 'libs/binder/ndk/ibinder_internal.h')
-rw-r--r--libs/binder/ndk/ibinder_internal.h16
1 files changed, 4 insertions, 12 deletions
diff --git a/libs/binder/ndk/ibinder_internal.h b/libs/binder/ndk/ibinder_internal.h
index 6824306fbf..902fe7934d 100644
--- a/libs/binder/ndk/ibinder_internal.h
+++ b/libs/binder/ndk/ibinder_internal.h
@@ -22,7 +22,6 @@
#include <atomic>
#include <mutex>
-#include <optional>
#include <vector>
#include <binder/Binder.h>
@@ -53,14 +52,10 @@ struct AIBinder : public virtual ::android::RefBase {
}
private:
- std::optional<bool> associateClassInternal(const AIBinder_Class* clazz,
- const ::android::String16& newDescriptor, bool set);
-
// AIBinder instance is instance of this class for a local object. In order to transact on a
// remote object, this also must be set for simplicity (although right now, only the
// interfaceDescriptor from it is used).
const AIBinder_Class* mClazz;
- std::mutex mClazzMutex;
};
// This is a local AIBinder object with a known class.
@@ -112,8 +107,7 @@ struct AIBinder_Class {
AIBinder_Class(const char* interfaceDescriptor, AIBinder_Class_onCreate onCreate,
AIBinder_Class_onDestroy onDestroy, AIBinder_Class_onTransact onTransact);
- const ::android::String16& getInterfaceDescriptor() const { return mWideInterfaceDescriptor; }
- const char* getInterfaceDescriptorUtf8() const { return mInterfaceDescriptor.c_str(); }
+ const ::android::String16& getInterfaceDescriptor() const { return mInterfaceDescriptor; }
// required to be non-null, implemented for every class
const AIBinder_Class_onCreate onCreate = nullptr;
@@ -125,11 +119,9 @@ struct AIBinder_Class {
AIBinder_handleShellCommand handleShellCommand = nullptr;
private:
- // Copy of the raw char string for when we don't have to return UTF-16
- const std::string mInterfaceDescriptor;
// This must be a String16 since BBinder virtual getInterfaceDescriptor returns a reference to
// one.
- const ::android::String16 mWideInterfaceDescriptor;
+ const ::android::String16 mInterfaceDescriptor;
};
// Ownership is like this (when linked to death):
@@ -164,8 +156,8 @@ struct AIBinder_DeathRecipient : ::android::RefBase {
};
explicit AIBinder_DeathRecipient(AIBinder_DeathRecipient_onBinderDied onDied);
- binder_status_t linkToDeath(const ::android::sp<::android::IBinder>&, void* cookie);
- binder_status_t unlinkToDeath(const ::android::sp<::android::IBinder>& binder, void* cookie);
+ binder_status_t linkToDeath(::android::sp<::android::IBinder>, void* cookie);
+ binder_status_t unlinkToDeath(::android::sp<::android::IBinder> binder, void* cookie);
private:
// When the user of this API deletes a Bp object but not the death recipient, the