Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2123)

Unified Diff: device/generic_sensor/android/java/src/org/chromium/device/sensors/PlatformSensor.java

Issue 2726093003: [sensors][android] Add support for AbsoluteOrientation sensor (Closed)
Patch Set: Rebased to master, rename enum Created 3 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | device/generic_sensor/android/java/src/org/chromium/device/sensors/PlatformSensorProvider.java » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: device/generic_sensor/android/java/src/org/chromium/device/sensors/PlatformSensor.java
diff --git a/device/generic_sensor/android/java/src/org/chromium/device/sensors/PlatformSensor.java b/device/generic_sensor/android/java/src/org/chromium/device/sensors/PlatformSensor.java
index 1d825fe3ac83e358ca644aaa61cbefa298fdf031..ea60b3d7f1fea704b94445343af7b4cc8084b737 100644
--- a/device/generic_sensor/android/java/src/org/chromium/device/sensors/PlatformSensor.java
+++ b/device/generic_sensor/android/java/src/org/chromium/device/sensors/PlatformSensor.java
@@ -205,9 +205,9 @@ public class PlatformSensor implements SensorEventListener {
* Updates reading at native device::PlatformSensorAndroid.
*/
protected void updateSensorReading(
- double timestamp, double value1, double value2, double value3) {
+ double timestamp, double value1, double value2, double value3, double value4) {
nativeUpdatePlatformSensorReading(
- mNativePlatformSensorAndroid, timestamp, value1, value2, value3);
+ mNativePlatformSensorAndroid, timestamp, value1, value2, value3, value4);
}
@Override
@@ -224,17 +224,22 @@ public class PlatformSensor implements SensorEventListener {
double timestamp = event.timestamp * SECONDS_IN_NANOSECOND;
switch (event.values.length) {
case 1:
- updateSensorReading(timestamp, event.values[0], 0.0, 0.0);
+ updateSensorReading(timestamp, event.values[0], 0.0, 0.0, 0.0);
break;
case 2:
- updateSensorReading(timestamp, event.values[0], event.values[1], 0.0);
+ updateSensorReading(timestamp, event.values[0], event.values[1], 0.0, 0.0);
+ break;
+ case 3:
+ updateSensorReading(
+ timestamp, event.values[0], event.values[1], event.values[2], 0.0);
break;
default:
- updateSensorReading(timestamp, event.values[0], event.values[1], event.values[2]);
+ updateSensorReading(timestamp, event.values[0], event.values[1], event.values[2],
+ event.values[3]);
}
}
private native void nativeNotifyPlatformSensorError(long nativePlatformSensorAndroid);
private native void nativeUpdatePlatformSensorReading(long nativePlatformSensorAndroid,
- double timestamp, double value1, double value2, double value3);
+ double timestamp, double value1, double value2, double value3, double value4);
}
« no previous file with comments | « no previous file | device/generic_sensor/android/java/src/org/chromium/device/sensors/PlatformSensorProvider.java » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698