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

Issue 2284613002: [sensors] Android platform adaptation for Generic Sensor API (Closed)

Created:
4 years, 3 months ago by shalamov
Modified:
4 years, 3 months ago
CC:
Aaron Boodman, abarth-chromium, chromium-reviews, darin (slow to review), darin-cc_chromium.org, jam, Mikhail, mlamouri+watch-content_chromium.org, qsr+mojo_chromium.org, viettrungluu+watch_chromium.org, yzshen+watch_chromium.org, maksims (do not use this acc)
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

[sensors] Android platform adaptation for Generic Sensor API Authors: Alexander Shalamov, Mikhail Pozdnyakov This patch introduces implementation of generic sensor interfaces for Android platform. Support for following sensors is added: ambient light, gyroscope, accelerometer, linear acceleration and magnetometer. BUG=606766 Committed: https://crrev.com/a0d874185edcfa35107b3c05fa3dba412297bdc9 Cr-Commit-Position: refs/heads/master@{#419119}

Patch Set 1 : [sensors] Android platform adaptation for Generic Sensor API #

Total comments: 4

Patch Set 2 : Remove unneeded dependencies. #

Total comments: 1

Patch Set 3 : Remove redundant virtual specifiers #

Total comments: 2

Patch Set 4 : Rebase to master, remove obsolete gn deps. #

Patch Set 5 : Rebased. #

Total comments: 34

Patch Set 6 : Fixes for Ted.C review comments + unit tests. #

Total comments: 13

Patch Set 7 : Fixes for Tim's comments. #

Total comments: 27

Patch Set 8 : Fixes for comments from Ted and Tim. #

Patch Set 9 : Rebase to master. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+1217 lines, -7 lines) Patch
M content/app/BUILD.gn View 1 2 3 4 5 6 7 8 1 chunk +1 line, -0 lines 0 comments Download
M content/app/DEPS View 1 chunk +1 line, -0 lines 0 comments Download
M content/app/android/library_loader_hooks.cc View 2 chunks +4 lines, -0 lines 0 comments Download
M content/public/android/BUILD.gn View 1 2 3 4 5 6 7 8 1 chunk +1 line, -0 lines 0 comments Download
M device/BUILD.gn View 1 2 3 4 5 6 7 1 chunk +6 lines, -1 line 0 comments Download
M device/generic_sensor/BUILD.gn View 1 2 3 4 5 6 7 2 chunks +40 lines, -0 lines 0 comments Download
A device/generic_sensor/DEPS View 1 chunk +3 lines, -0 lines 0 comments Download
A device/generic_sensor/android/java/src/org/chromium/device/sensors/PlatformSensor.java View 1 2 3 4 5 6 7 1 chunk +258 lines, -0 lines 0 comments Download
A device/generic_sensor/android/java/src/org/chromium/device/sensors/PlatformSensorProvider.java View 1 2 3 4 5 6 7 1 chunk +157 lines, -0 lines 0 comments Download
A device/generic_sensor/android/junit/src/org/chromium/device/sensors/PlatformSensorAndProviderTest.java View 1 2 3 4 5 6 7 8 1 chunk +438 lines, -0 lines 0 comments Download
A device/generic_sensor/android/sensors_jni_registrar.h View 1 chunk +22 lines, -0 lines 0 comments Download
A device/generic_sensor/android/sensors_jni_registrar.cc View 1 chunk +27 lines, -0 lines 0 comments Download
M device/generic_sensor/platform_sensor.h View 1 2 3 4 1 chunk +4 lines, -1 line 0 comments Download
M device/generic_sensor/platform_sensor.cc View 1 2 3 4 5 6 1 chunk +22 lines, -0 lines 0 comments Download
A device/generic_sensor/platform_sensor_android.h View 1 2 3 1 chunk +57 lines, -0 lines 0 comments Download
A device/generic_sensor/platform_sensor_android.cc View 1 2 3 4 5 1 chunk +90 lines, -0 lines 0 comments Download
A device/generic_sensor/platform_sensor_provider_android.cc View 1 chunk +74 lines, -0 lines 0 comments Download
M device/generic_sensor/platform_sensor_provider_base.h View 1 2 3 4 5 6 1 chunk +0 lines, -5 lines 0 comments Download
M device/generic_sensor/public/cpp/platform_sensor_configuration.h View 1 2 3 4 5 6 1 chunk +5 lines, -0 lines 0 comments Download
M device/generic_sensor/public/cpp/platform_sensor_configuration.cc View 1 2 3 4 5 6 1 chunk +5 lines, -0 lines 0 comments Download
M device/generic_sensor/public/interfaces/sensor.mojom View 1 2 3 4 1 chunk +2 lines, -0 lines 0 comments Download

Dependent Patchsets:

Messages

Total messages: 57 (26 generated)
shalamov
PTAL
4 years, 3 months ago (2016-08-29 08:21:21 UTC) #3
jochen (gone - plz use gerrit)
https://codereview.chromium.org/2284613002/diff/20001/chrome/common/BUILD.gn File chrome/common/BUILD.gn (right): https://codereview.chromium.org/2284613002/diff/20001/chrome/common/BUILD.gn#newcode156 chrome/common/BUILD.gn:156: "//device/generic_sensor", why is this needed? https://codereview.chromium.org/2284613002/diff/20001/content/renderer/BUILD.gn File content/renderer/BUILD.gn (right): ...
4 years, 3 months ago (2016-08-29 09:28:26 UTC) #4
shalamov
https://codereview.chromium.org/2284613002/diff/20001/chrome/common/BUILD.gn File chrome/common/BUILD.gn (right): https://codereview.chromium.org/2284613002/diff/20001/chrome/common/BUILD.gn#newcode156 chrome/common/BUILD.gn:156: "//device/generic_sensor", On 2016/08/29 09:28:25, jochen wrote: > why is ...
4 years, 3 months ago (2016-08-29 10:37:53 UTC) #5
Tom Sepez
Mojom RS LGTM on adding two new types to enum.
4 years, 3 months ago (2016-08-29 16:38:54 UTC) #6
ncarter (slow)
content/ lgtm
4 years, 3 months ago (2016-08-29 16:43:17 UTC) #7
ncarter (slow)
https://codereview.chromium.org/2284613002/diff/40001/device/generic_sensor/platform_sensor_android.h File device/generic_sensor/platform_sensor_android.h (right): https://codereview.chromium.org/2284613002/diff/40001/device/generic_sensor/platform_sensor_android.h#newcode40 device/generic_sensor/platform_sensor_android.h:40: const PlatformSensorConfiguration& configuration) override; note that 'virtual' is unnecessary ...
4 years, 3 months ago (2016-08-29 17:37:51 UTC) #8
Reilly Grant (use Gerrit)
lgtm modulo nick's style comments.
4 years, 3 months ago (2016-08-29 18:14:05 UTC) #11
jochen (gone - plz use gerrit)
https://codereview.chromium.org/2284613002/diff/60001/content/public/android/BUILD.gn File content/public/android/BUILD.gn (right): https://codereview.chromium.org/2284613002/diff/60001/content/public/android/BUILD.gn#newcode39 content/public/android/BUILD.gn:39: "//device/generic_sensor:java", sorry for not catching this earlier, but I ...
4 years, 3 months ago (2016-08-30 11:50:31 UTC) #14
shalamov
https://codereview.chromium.org/2284613002/diff/60001/content/public/android/BUILD.gn File content/public/android/BUILD.gn (right): https://codereview.chromium.org/2284613002/diff/60001/content/public/android/BUILD.gn#newcode39 content/public/android/BUILD.gn:39: "//device/generic_sensor:java", On 2016/08/30 11:50:31, jochen wrote: > sorry for ...
4 years, 3 months ago (2016-08-31 07:20:27 UTC) #15
jochen (gone - plz use gerrit)
lgtm
4 years, 3 months ago (2016-08-31 14:35:58 UTC) #23
Ted C
I only reviewed the java code. When you add reviewers, please be specific about what ...
4 years, 3 months ago (2016-09-01 00:12:36 UTC) #24
timvolodine
shalamov@: - because you are asking non API specific owners for reviews, could you please ...
4 years, 3 months ago (2016-09-02 14:07:24 UTC) #25
shalamov
On 2016/09/02 14:07:24, timvolodine wrote: > shalamov@: > > - because you are asking non ...
4 years, 3 months ago (2016-09-02 14:51:13 UTC) #26
shalamov
4 years, 3 months ago (2016-09-02 14:51:37 UTC) #27
timvolodine
On 2016/09/02 14:51:13, shalamov wrote: > On 2016/09/02 14:07:24, timvolodine wrote: > > shalamov@: > ...
4 years, 3 months ago (2016-09-02 19:43:15 UTC) #28
shalamov
Thanks for comments Ted. Sorry for not being explicit about what should be checked. I ...
4 years, 3 months ago (2016-09-06 12:36:43 UTC) #31
timvolodine
Thanks! A few comments below. I see the other *_android.cc implementations are mostly glue for ...
4 years, 3 months ago (2016-09-06 17:44:38 UTC) #32
shalamov
https://codereview.chromium.org/2284613002/diff/160001/device/generic_sensor/android/java/src/org/chromium/device/sensors/PlatformSensor.java File device/generic_sensor/android/java/src/org/chromium/device/sensors/PlatformSensor.java (right): https://codereview.chromium.org/2284613002/diff/160001/device/generic_sensor/android/java/src/org/chromium/device/sensors/PlatformSensor.java#newcode27 device/generic_sensor/android/java/src/org/chromium/device/sensors/PlatformSensor.java:27: public class PlatformSensor implements SensorEventListener, PlatformSensorNotifier { On 2016/09/06 ...
4 years, 3 months ago (2016-09-07 13:53:42 UTC) #33
timvolodine
thanks, PlatformSensorProviderTest.java -- lgtm % comments below https://codereview.chromium.org/2284613002/diff/160001/device/generic_sensor/android/java/src/org/chromium/device/sensors/PlatformSensor.java File device/generic_sensor/android/java/src/org/chromium/device/sensors/PlatformSensor.java (right): https://codereview.chromium.org/2284613002/diff/160001/device/generic_sensor/android/java/src/org/chromium/device/sensors/PlatformSensor.java#newcode27 device/generic_sensor/android/java/src/org/chromium/device/sensors/PlatformSensor.java:27: public class ...
4 years, 3 months ago (2016-09-07 14:51:06 UTC) #34
Ted C
https://codereview.chromium.org/2284613002/diff/180001/device/generic_sensor/android/java/src/org/chromium/device/sensors/PlatformSensor.java File device/generic_sensor/android/java/src/org/chromium/device/sensors/PlatformSensor.java (right): https://codereview.chromium.org/2284613002/diff/180001/device/generic_sensor/android/java/src/org/chromium/device/sensors/PlatformSensor.java#newcode112 device/generic_sensor/android/java/src/org/chromium/device/sensors/PlatformSensor.java:112: protected void initPlatformSensorAndroid(long nativePlatformSensorAndroid, ByteBuffer buffer) { looks like ...
4 years, 3 months ago (2016-09-07 18:12:24 UTC) #35
shalamov
https://codereview.chromium.org/2284613002/diff/180001/device/generic_sensor/android/java/src/org/chromium/device/sensors/PlatformSensor.java File device/generic_sensor/android/java/src/org/chromium/device/sensors/PlatformSensor.java (right): https://codereview.chromium.org/2284613002/diff/180001/device/generic_sensor/android/java/src/org/chromium/device/sensors/PlatformSensor.java#newcode177 device/generic_sensor/android/java/src/org/chromium/device/sensors/PlatformSensor.java:177: protected boolean startSensor(double frequency) { On 2016/09/07 18:12:23, Ted ...
4 years, 3 months ago (2016-09-07 18:49:18 UTC) #36
Ted C
https://codereview.chromium.org/2284613002/diff/180001/device/generic_sensor/android/junit/src/org/chromium/device/sensors/PlatformSensorProviderTest.java File device/generic_sensor/android/junit/src/org/chromium/device/sensors/PlatformSensorProviderTest.java (right): https://codereview.chromium.org/2284613002/diff/180001/device/generic_sensor/android/junit/src/org/chromium/device/sensors/PlatformSensorProviderTest.java#newcode338 device/generic_sensor/android/junit/src/org/chromium/device/sensors/PlatformSensorProviderTest.java:338: SensorEvent mockEvent = mock(SensorEvent.class); On 2016/09/07 18:49:18, shalamov wrote: ...
4 years, 3 months ago (2016-09-07 20:08:12 UTC) #37
timvolodine
https://codereview.chromium.org/2284613002/diff/180001/device/generic_sensor/android/junit/src/org/chromium/device/sensors/PlatformSensorProviderTest.java File device/generic_sensor/android/junit/src/org/chromium/device/sensors/PlatformSensorProviderTest.java (right): https://codereview.chromium.org/2284613002/diff/180001/device/generic_sensor/android/junit/src/org/chromium/device/sensors/PlatformSensorProviderTest.java#newcode333 device/generic_sensor/android/junit/src/org/chromium/device/sensors/PlatformSensorProviderTest.java:333: .unregisterListener(any(SensorEventListener.class), any(Sensor.class)); On 2016/09/07 18:49:18, shalamov wrote: > On ...
4 years, 3 months ago (2016-09-08 12:35:06 UTC) #38
timvolodine
https://codereview.chromium.org/2284613002/diff/180001/device/generic_sensor/android/java/src/org/chromium/device/sensors/PlatformSensorNotifier.java File device/generic_sensor/android/java/src/org/chromium/device/sensors/PlatformSensorNotifier.java (right): https://codereview.chromium.org/2284613002/diff/180001/device/generic_sensor/android/java/src/org/chromium/device/sensors/PlatformSensorNotifier.java#newcode10 device/generic_sensor/android/java/src/org/chromium/device/sensors/PlatformSensorNotifier.java:10: interface PlatformSensorNotifier { On 2016/09/07 18:49:18, shalamov wrote: > ...
4 years, 3 months ago (2016-09-08 12:51:03 UTC) #39
shalamov
- Removed PlatformSensorNotifier. Native callbacks are tested by overriden methods in TestPlatformSensor. - Added reflection ...
4 years, 3 months ago (2016-09-08 13:40:49 UTC) #40
Ted C
java - lgtm
4 years, 3 months ago (2016-09-08 20:06:25 UTC) #41
shalamov
jochen@ could you please take a look at content/public/android/BUILD.gn I started testing blink bindings to ...
4 years, 3 months ago (2016-09-09 06:15:51 UTC) #44
shalamov
On 2016/09/09 06:15:51, shalamov wrote: > jochen@ could you please take a look at content/public/android/BUILD.gn ...
4 years, 3 months ago (2016-09-13 09:32:22 UTC) #47
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2284613002/220001
4 years, 3 months ago (2016-09-16 06:52:59 UTC) #54
commit-bot: I haz the power
Committed patchset #9 (id:220001)
4 years, 3 months ago (2016-09-16 06:59:32 UTC) #55
commit-bot: I haz the power
4 years, 3 months ago (2016-09-16 07:01:41 UTC) #57
Message was sent while issue was closed.
Patchset 9 (id:??) landed as
https://crrev.com/a0d874185edcfa35107b3c05fa3dba412297bdc9
Cr-Commit-Position: refs/heads/master@{#419119}

Powered by Google App Engine
This is Rietveld 408576698