Android 7.0.0 release 3
Prevent camera app crashes on changing hw.camera.* settings

If the AVD's config.ini changes hw.camera.*, this is effectively,
connecting/disconnecting camera hardware, and the current
way in which camera settings are handled assumes
that the set of cameras never changes, which can lead to
the camera app crashing if the camera app was used successfuly
with one configuration of hw.camera.* and then
the AVD was restarted with a different configuration.

In particular, the crash happens if the number of cameras
has been reduced since the last run, and the camera app
is looking up a preferred camera ID that is not supported
by the new number of cameras.

bug: 28417929
BUG: https://code.google.com/p/android/issues/detail?id=206945

Change-Id: Ib0e26ae77d376f31f3cc281e386d3c67291c1edc
(cherry picked from commit 8f339abd9245577c348f5ba22322e8801c21faf8)
1 file changed