OLD | NEW |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "device/generic_sensor/platform_sensor_android.h" | 5 #include "device/generic_sensor/platform_sensor_android.h" |
6 | 6 |
7 #include "base/android/context_utils.h" | |
8 #include "base/bind.h" | 7 #include "base/bind.h" |
9 #include "jni/PlatformSensor_jni.h" | 8 #include "jni/PlatformSensor_jni.h" |
10 | 9 |
11 using base::android::AttachCurrentThread; | 10 using base::android::AttachCurrentThread; |
12 using base::android::JavaRef; | 11 using base::android::JavaRef; |
13 | 12 |
14 namespace device { | 13 namespace device { |
15 | 14 |
16 // static | 15 // static |
17 bool PlatformSensorAndroid::RegisterJNI(JNIEnv* env) { | 16 bool PlatformSensorAndroid::RegisterJNI(JNIEnv* env) { |
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
92 reading.values[0] = value1; | 91 reading.values[0] = value1; |
93 reading.values[1] = value2; | 92 reading.values[1] = value2; |
94 reading.values[2] = value3; | 93 reading.values[2] = value3; |
95 reading.values[3] = value4; | 94 reading.values[3] = value4; |
96 | 95 |
97 bool needNotify = (GetReportingMode() == mojom::ReportingMode::ON_CHANGE); | 96 bool needNotify = (GetReportingMode() == mojom::ReportingMode::ON_CHANGE); |
98 UpdateSensorReading(reading, needNotify); | 97 UpdateSensorReading(reading, needNotify); |
99 } | 98 } |
100 | 99 |
101 } // namespace device | 100 } // namespace device |
OLD | NEW |