[iOS][RBS] Stop observing camera on dealloc.

Uses a new BOOL to decide when to stop KVO from the camera object
instead of checking the camera availability. This fixes a crash that
occurs when the camera starts being observed but this is never stoped
due the camera never being available in the first place. See attached
bug for more info.

Includes minor fixes. Changes |self.cameraState| to |_cameraState| on
init, which was triggering a NOTREACHED condition in debug builds.
Other properties with custom setters where not changed for ivars, this
to prevent undesired changes. Changes an AV string to the proper
constant.


Bug: 972093
Change-Id: I60e86c10fe11c129e2fdd07a01295a7db1673103
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1680177
Reviewed-by: Mark Cogan <marq@chromium.org>
Commit-Queue: Javier Ernesto Flores Robles <javierrobles@chromium.org>
Cr-Commit-Position: refs/heads/master@{#672907}
1 file changed