From 403161ab73ad230ab27321a570b1c41d3b1af4a2 Mon Sep 17 00:00:00 2001 From: Martijn Coenen Date: Fri, 18 Nov 2016 15:29:32 +0100 Subject: [PATCH] Use newly introduced hidl_handle. Bug: 32089785 Test: builds Change-Id: I27c7d3945e1fe390661bf322987011a00fe9b3fe --- tests/bar/1.0/default/Bar.cpp | 4 ++-- tests/bar/1.0/default/Bar.h | 2 +- tests/foo/1.0/default/Foo.cpp | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/tests/bar/1.0/default/Bar.cpp b/tests/bar/1.0/default/Bar.cpp index 2158cd8722..c07e2fabdc 100644 --- a/tests/bar/1.0/default/Bar.cpp +++ b/tests/bar/1.0/default/Bar.cpp @@ -153,8 +153,8 @@ Return Bar::thisIsNew() { return Void(); } -Return Bar::expectNullHandle(const native_handle_t* h, const Abc& xyz, expectNullHandle_cb _hidl_cb) { - ALOGI("SERVER(Bar) h = %p, xyz.z = %p", h, static_cast(xyz.z)); +Return Bar::expectNullHandle(const hidl_handle& h, const Abc& xyz, expectNullHandle_cb _hidl_cb) { + ALOGI("SERVER(Bar) h = %p, xyz.z = %p", h.getNativeHandle(), xyz.z.getNativeHandle()); _hidl_cb(h == nullptr, xyz.z == nullptr); return Void(); } diff --git a/tests/bar/1.0/default/Bar.h b/tests/bar/1.0/default/Bar.h index 4e22b610cf..29eedec29c 100644 --- a/tests/bar/1.0/default/Bar.h +++ b/tests/bar/1.0/default/Bar.h @@ -64,7 +64,7 @@ struct Bar : public IBar { // Methods from ::android::hardware::tests::bar::V1_0::IBar follow. Return thisIsNew() override; - Return expectNullHandle(const native_handle_t* h, const Abc& xyz, expectNullHandle_cb _hidl_cb) override; + Return expectNullHandle(const hidl_handle& h, const Abc& xyz, expectNullHandle_cb _hidl_cb) override; private: sp mFoo; diff --git a/tests/foo/1.0/default/Foo.cpp b/tests/foo/1.0/default/Foo.cpp index f7cc7c0a43..a1df3b28ad 100644 --- a/tests/foo/1.0/default/Foo.cpp +++ b/tests/foo/1.0/default/Foo.cpp @@ -309,7 +309,7 @@ Return Foo::createMyHandle(createMyHandle_cb _hidl_cb) { } Return Foo::createHandles(uint32_t size, createHandles_cb _hidl_cb) { - hidl_vec handles; + hidl_vec handles; handles.resize(size); for(uint32_t i = 0; i < size; ++i) { createMyHandle([&](const MyHandle& h) {