OSDN Git Service

Remove exception when releasing a requested, not yet opened camera
authorAlan Newberger <alann@google.com>
Mon, 12 Jan 2015 19:27:30 +0000 (11:27 -0800)
committerAlan Newberger <alann@google.com>
Mon, 12 Jan 2015 19:27:30 +0000 (11:27 -0800)
commit662082d70ce8dc5f679a25322a00c2733f0339f2
tree773fc3c6dcbba7dd23dba9d4c1b44ef31283c895
parent39cc6d07fa2f798b3915848087d6baf77a28874f
Remove exception when releasing a requested, not yet opened camera

From monkey tests, we see a spike in an exception from new device
which is likely due to slow close performance. If we camera B is
open, and we request camera A, B will be closed then A opened. If
we release A during this process but B is not yet closed, don't
crash, just let the pending underlying open of A happen and release
the request. Preserve the exception for application errors where
truly unrequested cameras are released.

Bug: 17975345
Change-Id: I9aa3b0575e130f516cea6a3df120e4812df55bce
src/com/android/camera/app/CameraController.java