Use ERROR_CAMERA_DISCONNECTED on id remap
- There are many more advantages to using ERROR_DISCONNECTED instead of ERROR_DEVICE. - It won't impact app analytics and flag unnecessary errors to the app. - It's a much more common scenario to get disconnected than receing a device error, so apps are more likely to handle it - disconnect happens when another higher priority app wants to use the same camera, which can be common among multi-window scenarios. - Previously, we were using ERROR_CAMERA_DEVICE. However, if an app tries to immediately reconnect on receiving that error, they are often able to connect before we have even finished disconnecting. This is because we need to release the mServiceLock before disconnecting. - Whereas, the next time an app can call connect() after being disconnected() is likely onAvailable(), which is only triggered after we have fully disconnected(). Bug: 302145405 Test: Tested locally Change-Id: I54a19ca71f7126bc46d9f2a3086d75af2e5d87ea Merged-In: I54a19ca71f7126bc46d9f2a3086d75af2e5d87ea Merged-In: Ia32babe51a31ef6dc2b9ae4570813396a75b76dc
Loading
Please register or sign in to comment