Test cmd for vendor.goodix.extend.service

This commit is contained in:
Pierre-Hugues Husson 2019-12-13 10:07:42 +01:00 committed by tboy1991
parent 585bc6673f
commit 937bf8e8b4
2 changed files with 29 additions and 0 deletions

View File

@ -158,3 +158,15 @@ cc_binary {
"asus-motor.cpp", "asus-motor.cpp",
], ],
} }
cc_binary {
name: "goodix-fp",
srcs: [
"goodix-fp.cpp",
],
shared_libs: [
"vendor.goodix.extend.service@2.0",
"libutils",
"libhidlbase",
],
}

17
cmds/goodix-fp.cpp Normal file
View File

@ -0,0 +1,17 @@
#include <iostream>
#include <vendor/goodix/extend/service/2.0/IGoodixFPExtendService.h>
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;
}