stagefright: Avoid querying time from AudioPlayer after audio EOS

If a clip's audio track is shorter than its video track, the system
clock is used as the time source after audio EOS. However AwesomePlayer
continues to query the media time from AudioPlayer within
onVideoLagUpdate. This may take longer than the expected onVideoEvent
interval of 20 ms which can cause delayed or dropped frames.

Additionally, if onVideoEvent is more than 500 ms late, AwesomePlayer
triggers a video-only seek to the incorrect audio EOS media time. Since
the system clock continues to tick, video becomes even later after seek
and seek is triggered again, resulting in a continuous seek.

Stop querying the media time from AudioPlayer after audio EOS to avoid
this scenario.

Change-Id: I5c56a51509f8787d384696c703a9327b0fa5dbac
CRs-Fixed: 739308
surfacemediasource: Do not assume that onBuffersReleased means EOS

When using a surface media source the callee may release/allocate
buffers, for instance when negotiating formats with an external source.

This means that onBuffersReleased might be called but that does not mean
that there isn't a producer in the other end, just that it might have changed
formats.

This patch solves that by if-deffing a CAF addition that makes wifi-display
non-functional in some devices.

Change-Id: Ie702c1b4b32f0b00388beea9cf2ff032a50b0bdb
audio: handle events properly in AudioOutput::CallbackWrapper()

- MediaPlayerService::AudioOutput::CallbackWrapper() can't handle
  AudioTrack::EVENT_STREAM_END and AudioTrack::EVENT_NEW_IAUDIOTRACK

- Fix is to handle the events separately.

Change-Id: I986ce8d859dced19fa0bc82acb180fbd11417ca9
CRs-Fixed: 678573
camera: Allow hardware/camera.h header to be overridden

Change-Id: I715ba261de0b01e61cbfe7cacd567a9f511fb8cb
camera: Include camera parameters in device tree

Simple option to include camera parameters into your device tree.
All info can be seen here:
http://forum.xda-developers.com/android/help/dev-mod-to-add-extra-camera-parameters-t2814578

Change-Id: Ic5b27670fd0bb6ec11f6e902ce7ec3ca2ca10827