sensorhal: remove unnecessary flags argument
am: 2b9311a5a6
Change-Id: I249faf398c2fea63a2ab8a2919c43954cd5cdeaa
This commit is contained in:
@@ -241,12 +241,12 @@ int ActivityContext::enableActivityEvent(
|
|||||||
mPrevActivity = -1;
|
mPrevActivity = -1;
|
||||||
mInitExitDone = false;
|
mInitExitDone = false;
|
||||||
|
|
||||||
mHubConnection->queueBatch(
|
mHubConnection->queueBatch(COMMS_SENSOR_ACTIVITY, 1000000,
|
||||||
COMMS_SENSOR_ACTIVITY, SENSOR_FLAG_ON_CHANGE_MODE, 1000000, max_batch_report_latency_ns);
|
max_batch_report_latency_ns);
|
||||||
mHubConnection->queueActivate(COMMS_SENSOR_ACTIVITY, true /* enable */);
|
mHubConnection->queueActivate(COMMS_SENSOR_ACTIVITY, true /* enable */);
|
||||||
} else if (max_batch_report_latency_ns != prev_latency) {
|
} else if (max_batch_report_latency_ns != prev_latency) {
|
||||||
mHubConnection->queueBatch(
|
mHubConnection->queueBatch(COMMS_SENSOR_ACTIVITY, 1000000,
|
||||||
COMMS_SENSOR_ACTIVITY, SENSOR_FLAG_ON_CHANGE_MODE, 1000000, max_batch_report_latency_ns);
|
max_batch_report_latency_ns);
|
||||||
}
|
}
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
|||||||
@@ -1099,7 +1099,6 @@ void HubConnection::queueSetDelay(int handle, nsecs_t sampling_period_ns)
|
|||||||
|
|
||||||
void HubConnection::queueBatch(
|
void HubConnection::queueBatch(
|
||||||
int handle,
|
int handle,
|
||||||
__attribute__((unused)) int flags,
|
|
||||||
nsecs_t sampling_period_ns,
|
nsecs_t sampling_period_ns,
|
||||||
nsecs_t max_report_latency_ns)
|
nsecs_t max_report_latency_ns)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -53,7 +53,6 @@ struct HubConnection : public Thread {
|
|||||||
void queueSetDelay(int handle, nsecs_t delayNs);
|
void queueSetDelay(int handle, nsecs_t delayNs);
|
||||||
void queueBatch(
|
void queueBatch(
|
||||||
int handle,
|
int handle,
|
||||||
int flags,
|
|
||||||
nsecs_t sampling_period_ns,
|
nsecs_t sampling_period_ns,
|
||||||
nsecs_t max_report_latency_ns);
|
nsecs_t max_report_latency_ns);
|
||||||
void queueFlush(int handle);
|
void queueFlush(int handle);
|
||||||
|
|||||||
@@ -106,7 +106,6 @@ int SensorContext::poll(sensors_event_t *data, int count) {
|
|||||||
|
|
||||||
int SensorContext::batch(
|
int SensorContext::batch(
|
||||||
int handle,
|
int handle,
|
||||||
int flags,
|
|
||||||
int64_t sampling_period_ns,
|
int64_t sampling_period_ns,
|
||||||
int64_t max_report_latency_ns) {
|
int64_t max_report_latency_ns) {
|
||||||
ALOGI("batch");
|
ALOGI("batch");
|
||||||
@@ -130,9 +129,8 @@ int SensorContext::batch(
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
mHubConnection->queueBatch(
|
mHubConnection->queueBatch(handle, sampling_period_ns_clamped,
|
||||||
handle, flags, sampling_period_ns_clamped, max_report_latency_ns);
|
max_report_latency_ns);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -173,8 +171,9 @@ int SensorContext::BatchWrapper(
|
|||||||
int flags,
|
int flags,
|
||||||
int64_t sampling_period_ns,
|
int64_t sampling_period_ns,
|
||||||
int64_t max_report_latency_ns) {
|
int64_t max_report_latency_ns) {
|
||||||
|
(void) flags;
|
||||||
return reinterpret_cast<SensorContext *>(dev)->batch(
|
return reinterpret_cast<SensorContext *>(dev)->batch(
|
||||||
handle, flags, sampling_period_ns, max_report_latency_ns);
|
handle, sampling_period_ns, max_report_latency_ns);
|
||||||
}
|
}
|
||||||
|
|
||||||
// static
|
// static
|
||||||
|
|||||||
@@ -40,11 +40,8 @@ private:
|
|||||||
int setDelay(int handle, int64_t delayNs);
|
int setDelay(int handle, int64_t delayNs);
|
||||||
int poll(sensors_event_t *data, int count);
|
int poll(sensors_event_t *data, int count);
|
||||||
|
|
||||||
int batch(
|
int batch(int handle, int64_t sampling_period_ns,
|
||||||
int handle,
|
int64_t max_report_latency_ns);
|
||||||
int flags,
|
|
||||||
int64_t sampling_period_ns,
|
|
||||||
int64_t max_report_latency_ns);
|
|
||||||
|
|
||||||
int flush(int handle);
|
int flush(int handle);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user