summaryrefslogtreecommitdiffstats
path: root/tests/aidl_test_service.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'tests/aidl_test_service.cpp')
-rw-r--r--tests/aidl_test_service.cpp11
1 files changed, 11 insertions, 0 deletions
diff --git a/tests/aidl_test_service.cpp b/tests/aidl_test_service.cpp
index 9e2304e..abea6ae 100644
--- a/tests/aidl_test_service.cpp
+++ b/tests/aidl_test_service.cpp
@@ -27,6 +27,7 @@
#include <binder/IServiceManager.h>
#include <binder/ProcessState.h>
#include <binder/Status.h>
+#include <binder/Value.h>
#include <utils/Errors.h>
#include <utils/Log.h>
#include <utils/Looper.h>
@@ -67,6 +68,7 @@ using android::aidl::tests::BnTestService;
using android::aidl::tests::INamedCallback;
using android::aidl::tests::SimpleParcelable;
using android::os::PersistableBundle;
+using android::binder::Map;
// Standard library
using std::map;
@@ -117,6 +119,10 @@ class NativeService : public BnTestService {
ALOGI("Repeating token %s", token_str.str().c_str());
}
+ void LogRepeatedMapToken(const Map& token) {
+ ALOGI("Repeating Map with %d elements", (int)token.size());
+ }
+
Status RepeatBoolean(bool token, bool* _aidl_return) override {
LogRepeatedToken(token ? 1 : 0);
*_aidl_return = token;
@@ -157,6 +163,11 @@ class NativeService : public BnTestService {
*_aidl_return = token;
return Status::ok();
}
+ Status RepeatMap(const Map& token, Map* _aidl_return) override {
+ LogRepeatedMapToken(token);
+ *_aidl_return = token;
+ return Status::ok();
+ }
Status RepeatSimpleParcelable(const SimpleParcelable& input,
SimpleParcelable* repeat,