1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25
|
#define LOG_TAG "android.hardware.gnss@1.1-service.gpsd"
#include <hidl/HidlSupport.h>
#include <hidl/HidlTransportSupport.h>
#include "Gnss.h"
using ::android::hardware::configureRpcThreadpool;
using ::android::hardware::gnss::V1_1::implementation::Gnss;
using ::android::hardware::gnss::V1_1::IGnss;
using ::android::hardware::joinRpcThreadpool;
using ::android::OK;
using ::android::sp;
int main(int /* argc */, char* /* argv */ []) {
sp<IGnss> gnss = new Gnss();
configureRpcThreadpool(1, true /* will join */);
if (gnss->registerAsService() != OK) {
ALOGE("Could not register gnss 1.1 service.");
return 1;
}
joinRpcThreadpool();
ALOGE("Service exited!");
return 1;
}
|