Sleep for 100us and try to open the input device again if it fails, with a
maximum of 10 attempts.
We need the retry logic because setting permissions on a new input device is
racy. The init process watches for new input device (via uevent) and sets the
permission on them in devices.c:make_device(). However at the same time
EventHub.cpp watches for new input devices from the system_server process, and
immediately tries to open them. I can't see a simple way to avoid this race
condition.
As best as I can tell this race condition has always exisited.
There must have been some timing change that happened recently that causes us
to hit this race condition much more often. See repro notes in referenced bug.
Bug: 2375632
Merge commit '89e3c1ab017717b619b27ca312d87918981004ca' into eclair-plus-aosp
* commit '89e3c1ab017717b619b27ca312d87918981004ca':
Fix the sloppy detection in the ScaleGestureDetector.
Merge commit '2a79defa5a0481e4dd980938da13adc767e0b231' into eclair-plus-aosp
* commit '2a79defa5a0481e4dd980938da13adc767e0b231':
docs: add guide to copying and installing the Dev Tools app
make sure to fallback properly to software when copybit operation fails.
with this change, the preview image will at least be displayed in b&w
(since GL doesn't support the yuv format). This would also fix
2363506, but that one is now handled more cleanly.
Merge commit '48ef378d01b3ace349cbb6ba564276b854d872c9' into eclair-plus-aosp
* commit '48ef378d01b3ace349cbb6ba564276b854d872c9':
DO NOT MERGE Avoid wifi disable in a UNKNOWN state
Merge commit '1a337547d5377c57dbb10a24d4d73ad6bda829ea' into eclair-plus-aosp
* commit '1a337547d5377c57dbb10a24d4d73ad6bda829ea':
Add bugreport info about network feature use. DO NOT MERGE
Merge commit 'bb79e5fdb52eb86963fc688e6a455451b6e1a867' into eclair-plus-aosp
* commit 'bb79e5fdb52eb86963fc688e6a455451b6e1a867':
Be tolerant of GPS session and engine on status messages arriving out of order.
Merge commit '5615ca1979caa79041bf16a2cae49f9cfadd7ee5' into eclair-plus-aosp
* commit '5615ca1979caa79041bf16a2cae49f9cfadd7ee5':
docs: a lot of revision and expansion of the hello view tutorials
Merge commit '5910cb53ea7085dff4c8c6b9c1edde5a1b59fa28' into eclair-plus-aosp
* commit '5910cb53ea7085dff4c8c6b9c1edde5a1b59fa28':
Edge of screen slop detection for ScaleGestureDetector.
Merge commit 'de54a95b98b9d80c10ca2788b83386094222cb4f' into eclair-plus-aosp
* commit 'de54a95b98b9d80c10ca2788b83386094222cb4f':
docs: add a section about debugging web pages with the Console APIs;
Merge commit 'b1c4a2a3b37fccf68e6a9563cccf1685df2bf3e7' into eclair-plus-aosp
* commit 'b1c4a2a3b37fccf68e6a9563cccf1685df2bf3e7':
Fix issue #2364506: Phone locked up while listening to music and attempting to download an update