-
Gwendal Grignou authored
This reverts commit 42f6f938. Reason for revert: 1- We need to trigger event before reading 2- Reading one byte will make next reading unaligned. 3- The error was due to invalid group setting, fixed since. Original change's description: > Do not use the accelerometer device file when it's failed to read > > On some system / device configuration, the accelerometer device > file exists but can't be read by the browser process. When this > happens, it generates error log repeatedly, which is not great. > > This CL tries to address this issue in a way. On initializing > accelerometer configuration, it tries to read the device file > at that time, and when it fails to read, it just stops the > initialization and reports an error message. This happens once, > and does not generate repeated logs. > > Also, when an error happens, now it can obtain the errno and > print it as a part of the log, so it would be more understandable > why it fails. On my case, it is just permission denied, for some > reasons. > > Bug: 1134527 > Test: manually with nautilus device in the lab > Change-Id: Ib9823631a70fc54d3e3abc35067aff56a7d7ee50 > Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2454840 > Reviewed-by: Min Chen <minch@chromium.org> > Reviewed-by: James Cook <jamescook@chromium.org> > Commit-Queue: Jun Mukai <mukai@chromium.org> > Cr-Commit-Position: refs/heads/master@{#814780} TBR=jamescook@chromium.org,mukai@chromium.org,minch@chromium.org,chenghaoyang@chromium.org Change-Id: Icd2a780a14bd4e12358053f150a37bd3d7f46f75 No-Presubmit: true No-Tree-Checks: true No-Try: true Bug: 1134527,1133429 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2461648Reviewed-by:
Jun Mukai <mukai@chromium.org> Commit-Queue: Gwendal Grignou <gwendal@chromium.org> Auto-Submit: Gwendal Grignou <gwendal@chromium.org> Cr-Commit-Position: refs/heads/master@{#815187}
9490c8af