utils: handle RuntimeException when camera is in use

Change-Id: Id15580c2b459c434d3314b2b252d07498b0a4f3c