Chromium Code Reviews| Index: content/browser/device_sensors/sensor_manager_android.cc |
| diff --git a/content/browser/device_sensors/sensor_manager_android.cc b/content/browser/device_sensors/sensor_manager_android.cc |
| index eaaac2df39512f287f053814838ba0d943fb8a8b..abc37927dabd33130e233fca062e4310a980404c 100644 |
| --- a/content/browser/device_sensors/sensor_manager_android.cc |
| +++ b/content/browser/device_sensors/sensor_manager_android.cc |
| @@ -150,14 +150,14 @@ void SensorManagerAndroid::GotLight(JNIEnv*, jobject, double value) { |
| bool SensorManagerAndroid::Start(EventType event_type) { |
| DCHECK(!device_sensors_.is_null()); |
| - int rate_in_milliseconds = (event_type == kTypeLight) |
| - ? kLightSensorIntervalMillis |
| - : kInertialSensorIntervalMillis; |
| + int rate_in_microseconds = (event_type == kTypeLight) |
|
timvolodine
2014/09/26 13:09:16
int64?
|
| + ? kLightSensorIntervalMicroseconds |
| + : kInertialSensorIntervalMicroseconds; |
| return Java_DeviceSensors_start(AttachCurrentThread(), |
| device_sensors_.obj(), |
| reinterpret_cast<intptr_t>(this), |
| static_cast<jint>(event_type), |
| - rate_in_milliseconds); |
| + rate_in_microseconds); |
|
timvolodine
2014/09/26 13:09:16
also if you are using int64, the java interface sh
|
| } |
| void SensorManagerAndroid::Stop(EventType event_type) { |
| @@ -250,7 +250,8 @@ void SensorManagerAndroid::CheckMotionBufferReadyToRead() { |
| received_motion_data_[RECEIVED_MOTION_DATA_ROTATION_RATE] == |
| number_active_device_motion_sensors_) { |
| device_motion_buffer_->seqlock.WriteBegin(); |
| - device_motion_buffer_->data.interval = kInertialSensorIntervalMillis; |
| + device_motion_buffer_->data.interval = |
| + kInertialSensorIntervalMicroseconds / 1000.; |
| device_motion_buffer_->seqlock.WriteEnd(); |
| SetMotionBufferReadyStatus(true); |