c81bb207c6
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 |
||
---|---|---|
.. | ||
tests | ||
Android.mk | ||
Camera.cpp | ||
CameraParameters.cpp | ||
EGLUtils.cpp | ||
EventHub.cpp | ||
EventRecurrence.cpp | ||
FramebufferNativeWindow.cpp | ||
GraphicBuffer.cpp | ||
GraphicBufferAllocator.cpp | ||
GraphicBufferMapper.cpp | ||
ICamera.cpp | ||
ICameraClient.cpp | ||
ICameraService.cpp | ||
IOverlay.cpp | ||
ISurface.cpp | ||
ISurfaceComposer.cpp | ||
ISurfaceFlingerClient.cpp | ||
KeyCharacterMap.cpp | ||
KeyLayoutMap.cpp | ||
KeyLayoutMap.h | ||
LayerState.cpp | ||
MODULE_LICENSE_APACHE2 | ||
NOTICE | ||
Overlay.cpp | ||
PixelFormat.cpp | ||
Rect.cpp | ||
Region.cpp | ||
SharedBufferStack.cpp | ||
Surface.cpp | ||
SurfaceComposerClient.cpp |