libstagefright: Return EOS after buffers are released

Return EOS from SurfaceMediaSource after buffers
have been released, due to disconnect from producer.

CRs-Fixed: 550868
Change-Id: I4b2f3ef1c2895f155260baa0c58d90df4b4210d9
libstagefright: Drain input buffer on resume

* Buffers returned from codec in paused state are
  not drained. When codec is resumed these buffers
  are not drained until the next flush, and may
  cause timed out issue.
* Added change to drain input buffers for sw
  decoders when resuming.

CRs-Fixed: 569585
CRs-Fixed: 574967
Change-Id: Ia62f03e025310457df57e3106575fcc011e64a54
Merge remote-tracking branch 'cm/cm-10.2' into cm-10.2
camera: Add flag to leave preview metadata alone

 * This causes severe problems on a certain camera.

Change-Id: I5adaef00bba2eaa3cab09452ad7ed46e24ac5364
Merge remote-tracking branch 'cm/cm-10.2' into cm-10.2
Revert "camera: Add flag to leave preview metadata alone"

This reverts commit a6e0b0ac42fc758ce6d26886c9a379e3e8fa840a.

Change-Id: I589caf34170d488ec75645c612d9c65f759eba2c
Merge remote-tracking branch 'cm/cm-10.2' into cm-10.2
Added Camera Parameters for Samsung Legacy QCOM Camera

This adds the Missing Legacy Samsung Camera Parameters to load the Camera HAL

Change-Id: Ib9166d4c38517b34003226a8471aa4ea25c03422
Typo in CameraParameters::set

Change-Id: I05a6a6adb02c326ae406be24471bd7290c481b5b
Typo: 'key' --> 'value'
camera: Fix the heap corruption issue

 * Add locking around flatten/unflatten because they alter mMap and
   all hope and sleep is lost if it changes while we're iterating.
 * It's even worse if the memory backing the params string changes
   underneath of us :(

Change-Id: I06d85343a4a1c0143fab0687fda9e1d95a28440e
Revert "camera: Fix the heap corruption issue"

This reverts commit 611526fd34bbe92f702eea0ff5bdd0e4f1f14904. Doesn't fix, breaks non-QCOMs :)

Change-Id: Icb1417f4120cab921f7cf879a215fc7ea66112a6
Merge remote-tracking branch 'cm/cm-10.2' into cm-10.2