From 937bf8e8b4235a2e86986845084e9480ad3cddda Mon Sep 17 00:00:00 2001 From: Pierre-Hugues Husson Date: Fri, 13 Dec 2019 10:07:42 +0100 Subject: [PATCH] Test cmd for vendor.goodix.extend.service --- cmds/Android.bp | 12 ++++++++++++ cmds/goodix-fp.cpp | 17 +++++++++++++++++ 2 files changed, 29 insertions(+) create mode 100644 cmds/goodix-fp.cpp diff --git a/cmds/Android.bp b/cmds/Android.bp index f5aaeee..888e791 100644 --- a/cmds/Android.bp +++ b/cmds/Android.bp @@ -158,3 +158,15 @@ cc_binary { "asus-motor.cpp", ], } + +cc_binary { + name: "goodix-fp", + srcs: [ + "goodix-fp.cpp", + ], + shared_libs: [ + "vendor.goodix.extend.service@2.0", + "libutils", + "libhidlbase", + ], +} diff --git a/cmds/goodix-fp.cpp b/cmds/goodix-fp.cpp new file mode 100644 index 0000000..f9e54f6 --- /dev/null +++ b/cmds/goodix-fp.cpp @@ -0,0 +1,17 @@ +#include +#include + +using ::vendor::goodix::extend::service::V2_0::IGoodixFPExtendService; +using ::android::sp; + +int main(int argc, char **argv) { + auto svc = IGoodixFPExtendService::getService(); + if(argc!=3) return 1; + int a = atoi(argv[1]); + int b = atoi(argv[2]); + auto ret = svc->goodixExtendCommand(a, b); + if(!ret.isOk()) { + std::cerr << "HWBinder call failed" << std::endl; + } + std::cout << "updateStatus returned " << toString(ret) << std::endl; +}