Restore activity lifecycle when OneCameraManager fails to initialize

The return in onCreateTasks when OneCameraManager catches an exception, cause
camera crashes instead of showing the failure dialog as intended. The exception
is an NPE in PanoramaViewHelper but is due to assumptions of things init'ed
in onCreate not holding due to the return when onStart is executed. While we
could proof out every object to assume lifecycle events exit, I prefer to
maintain lifecycle and remove the return, and make anything that relies on
OneCameraManager know that it could be null. This also moves the handling of the
error dialog down to CaptureModule, in the unlikely case an API1 module would
still work this enables it while preserving the same intended behavior for
CaptureModule.

Bug: 18048591
Change-Id: Ib81f8b42eaa26daae2d3354bae1ef5127a9cbcf1
2 files changed