sensorhal: remove unnecessary flags argument

am: 2b9311a5a6

Change-Id: I249faf398c2fea63a2ab8a2919c43954cd5cdeaa
This commit is contained in:
Andrew Rossignol
2016-07-07 00:49:15 +00:00
committed by android-build-merger
5 changed files with 10 additions and 16 deletions

View File

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

View File

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

View File

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

View File

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

View File

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