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

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

Issue 2284613002: [sensors] Android platform adaptation for Generic Sensor API (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebased. Created 4 years, 4 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
Index: device/generic_sensor/android/java/src/org/chromium/device/sensors/PlatformSensorConfiguration.java
diff --git a/device/generic_sensor/android/java/src/org/chromium/device/sensors/PlatformSensorConfiguration.java b/device/generic_sensor/android/java/src/org/chromium/device/sensors/PlatformSensorConfiguration.java
new file mode 100644
index 0000000000000000000000000000000000000000..f9e498d2672449bc027c4096f945cb8ed40f3c39
--- /dev/null
+++ b/device/generic_sensor/android/java/src/org/chromium/device/sensors/PlatformSensorConfiguration.java
@@ -0,0 +1,31 @@
+// Copyright 2016 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+package org.chromium.device.sensors;
+
+import org.chromium.base.annotations.CalledByNative;
+import org.chromium.base.annotations.JNINamespace;
+
+/**
+ * Holds information about sensor configuration, wraps data that is provided by native side
+ * class PlatformSensorConfigurationAndroid.
+ */
+@JNINamespace("device")
+final class PlatformSensorConfiguration {
Ted C 2016/09/01 00:12:36 This seems like overkill as well. why don't we ju
shalamov 2016/09/06 12:36:43 Removed, will consider adding it back once we have
+ private final double mFrequency;
+
+ PlatformSensorConfiguration(double frequency) {
+ mFrequency = frequency;
+ }
+
+ @CalledByNative
+ private static PlatformSensorConfiguration create(double frequency) {
+ return new PlatformSensorConfiguration(frequency);
+ }
+
+ @CalledByNative
+ public double getFrequency() {
+ return mFrequency;
+ }
+}

Powered by Google App Engine
This is Rietveld 408576698