using ::android::sp;
SensorManager::SensorManager()
- : mManager{::android::SensorManager::getInstanceForPackage(
+ : mInternalManager{::android::SensorManager::getInstanceForPackage(
String16(ISensorManager::descriptor))} {
}
// Methods from ::android::frameworks::sensorservice::V1_0::ISensorManager follow.
Return<void> SensorManager::getSensorList(getSensorList_cb _hidl_cb) {
::android::Sensor const* const* list;
- ssize_t count = mManager.getSensorList(&list);
+ ssize_t count = mInternalManager.getSensorList(&list);
if (count < 0 || !list) {
LOG(ERROR) << "::android::SensorManager::getSensorList encounters " << count;
_hidl_cb({}, Result::UNKNOWN_ERROR);
}
Return<void> SensorManager::getDefaultSensor(SensorType type, getDefaultSensor_cb _hidl_cb) {
- ::android::Sensor const* sensor = mManager.getDefaultSensor(static_cast<int>(type));
+ ::android::Sensor const* sensor = mInternalManager.getDefaultSensor(static_cast<int>(type));
if (!sensor) {
_hidl_cb({}, Result::NOT_EXIST);
return Void();
return Void();
}
- createDirectChannel(mManager, size, SENSOR_DIRECT_MEM_TYPE_ASHMEM,
+ createDirectChannel(mInternalManager, size, SENSOR_DIRECT_MEM_TYPE_ASHMEM,
mem.handle(), _hidl_cb);
return Void();
const hidl_handle& buffer, uint64_t size,
createGrallocDirectChannel_cb _hidl_cb) {
- createDirectChannel(mManager, size, SENSOR_DIRECT_MEM_TYPE_GRALLOC,
+ createDirectChannel(mInternalManager, size, SENSOR_DIRECT_MEM_TYPE_GRALLOC,
buffer.getNativeHandle(), _hidl_cb);
return Void();