summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Steven Moreland <smoreland@google.com> 2022-12-01 21:33:56 +0000
committer Gerrit Code Review <noreply-gerritcodereview@google.com> 2022-12-01 21:33:56 +0000
commit30a1ac67bddcde0b5581fa272e60400f58f583dd (patch)
tree7abf46ee967a92f16c62567b1b812b1830da7430
parent24c96fa558bb90d941a18ad29e7c42c4dc0a3796 (diff)
parentaffab527c820c06d3a6b3c4451aaaa744e652eb7 (diff)
Merge "easy NDK backend way to construct instance name"
-rw-r--r--libs/binder/ndk/include_cpp/android/binder_interface_utils.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/libs/binder/ndk/include_cpp/android/binder_interface_utils.h b/libs/binder/ndk/include_cpp/android/binder_interface_utils.h
index 81975e7b63..9949de2aac 100644
--- a/libs/binder/ndk/include_cpp/android/binder_interface_utils.h
+++ b/libs/binder/ndk/include_cpp/android/binder_interface_utils.h
@@ -196,6 +196,10 @@ class BnCInterface : public INTERFACE {
bool isRemote() override final { return false; }
+ static std::string makeServiceName(std::string_view instance) {
+ return INTERFACE::descriptor + ("/" + std::string(instance));
+ }
+
protected:
/**
* This function should only be called by asBinder. Otherwise, there is a possibility of