Gallery2: Handled seek to previous frame in case of video trim

In case of video trim, if seeking pointed to a previous I frame
ealier than the trim start time, then the logic would enter an
infinite loop, calling seek continuously. Added appropriate
check to handle seek to previous I frame condition.

Change-Id: I07ca4b60eeb1f87175dffcac59da8a29901034d1
A couple of fixes

- using LDFLAGS doesn't pull the required dependencies, move
  to using LOCAL_SHARED_LIBRARIES
- eliminate 'implicit declaration' warnings

Change-Id: I57f6feca6bfcf8b2e9d439462a33c9757cdde07d
Signed-off-by: Marcus Oakland <marcus.oakland@arm.com>
Signed-off-by: Kévin PETIT <kevin.petit@arm.com>
Camera: Ensure background edition complete on back Key

Block back key event till the image will get displayed
while user pressed edit option/icon. This'll allow the
background process to cleanup memory. Added null check
and bitmap recycle to avoid crash.

Change-Id: Ied1c1f3ecf07a352743908135a5b7976373a58a3
CRs-Fixed:  587402
Camera: Fix out-of-order operations while setting up the editor

The buffer's producer is created by the cache pipeline generation,
so verifying that it isn't null before calling compute() is wrong.

This breaks a few devices, and should actually break them all, so
fix it; only check if getProducer() is valid after running setProducer()

Change-Id: I9d7d03fa9c9eb7063daef2ae28a78cd70b7a5ef3