Camera: Ensure device events are processed in order
Camera devices will use a client provided executor to handle all internal events. Typically executors provided by clients are limited and running in a single thread which makes it safe for the current implementation to make assumptions about the ordering. In some cases like the Kotlin 'Dispatchers.IO', the device executor can utilize a pool of threads. The ordering of events in this case could be random and depend on timing and scheduling decisions resulting in different kinds of errors and unexpected states. To avoid this, ensure that the critical device state handling is done by a single thread executor and is always in the order expected by the implementation. Bug: 305857746 Test: Manual using camera application Change-Id: I33eed3db275be92422db2a646fcfc68d5a64f880
Loading
Please register or sign in to comment