sensorhal: remove unnecessary flags argument

Change-Id: I5d659bbc670aae9e8938ed87773fc40487a3fb7b
This commit is contained in:
Andrew Rossignol
2016-07-06 17:20:16 -07:00
parent 759d604909
commit 2b9311a5a6
5 changed files with 10 additions and 16 deletions

View File

@@ -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;

View File

@@ -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)
{ {

View File

@@ -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);

View File

@@ -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

View File

@@ -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);