QCamera2: Don't create jpeg session when there are no stream bufs.

Jpeg state machine internally waits indefinitely for input buffers
during state transition from idle -> executing. If there are buffer
allocation failures due to some reason and if we still create session,
this will lead to indefinite hang in jpeg layer. This might cause
framework reboot as well. Hence avoid this scenario by checking
the return value of call to getJpegEncodingConfig().

Change-Id: If9b59887b436eca1add21d0ff7c47f0e766fa58a
1 file changed