基于上一篇文章:
Android HIDL第一个demo编写: HIDL Test——实现Framework&App层与HAL进程IPC
使用的是Passthrough模式,这里修改为使用Binderized模式:
service.cpp文件写法:
#define LOG_TAG "[email protected]"
#include <android-base/logging.h>
#include <hidl/HidlTransportSupport.h>
#include <hidl/LegacySupport.h>
#include "HidlTest.h"
// libhwbinder
using android::hardware::configureRpcThreadpool;
using android::hardware::joinRpcThreadpool;