Revert "Revert "Second try at adding a compatibility symbol for the MemoryBase constructor.""

jellybean camera driver need this symbol

This reverts commit 2dccfdcd265ca86cca5ac863d921e5c647b93073.

Change-Id: I6f44bcc285d83bcd9c48c42c2d54c874dedc74c7
Check fence is not NULL before dereferencing it

If the fence obtained in dequeueBuffer is NULL, don't dereference it.
This will avoid a crash in surfaceflinger.

CRs-fixed: 516300
Change-Id: I3054dc37087103f3addae7884bb03460484a1eec
(cherry picked from commit ddf4adb487dc76ccb75fe2432772d6fc575ed77c)
(cherry picked from commit c6ae5271f9ced9a747e1481c2ef875ba03674172)
(cherry picked from commit cdad709878601eb694acbce7d3ae9f7a74bf14f3)
binder: add compat symbol

Required for older Samsung libtvout

Change-Id: Ib18d2513570382432d49f302ab041230650372f2
Increase UI stability on some platforms