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

Unified Diff: device/generic_sensor/platform_sensor_android.cc

Issue 2465363004: [Sensors] Consider maximum supported frequency (Closed)
Patch Set: Comments from Alex Created 4 years, 1 month 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/platform_sensor_android.cc
diff --git a/device/generic_sensor/platform_sensor_android.cc b/device/generic_sensor/platform_sensor_android.cc
index 0ef7657d3971baadf35e92c357727f5729d22c8a..13b633e00552ce7324684fbf79bef9175bf47e2e 100644
--- a/device/generic_sensor/platform_sensor_android.cc
+++ b/device/generic_sensor/platform_sensor_android.cc
@@ -48,6 +48,11 @@ PlatformSensorConfiguration PlatformSensorAndroid::GetDefaultConfiguration() {
return PlatformSensorConfiguration(frequency);
}
+double PlatformSensorAndroid::GetMaximumSupportedFrequency() {
+ JNIEnv* env = AttachCurrentThread();
+ return Java_PlatformSensor_getMaximumSupportedFrequency(env, j_object_.obj());
+}
+
bool PlatformSensorAndroid::StartSensor(
const PlatformSensorConfiguration& configuration) {
JNIEnv* env = AttachCurrentThread();

Powered by Google App Engine
This is Rietveld 408576698