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