CM11 Themes: Store hash codes for target and overlay in idmap

Due to some system packages always having the same last modified
time stamp of 08/01/2008 we must use some other unique value to
determine that the contents of either the target or the overlay
have changed.  This unique value will be passed down from the java
layer and written to the idmap header.

This change requires the following patch from frameworks/base
http://review.cyanogenmod.org/62565

Change-Id: I0adcafaca96110268766d6e3349414364ecea4c3
GFX-3D: Hold the BufferReference of GraphicBuffer in BpGraphicBufferAlloc

BZ: 86716

In WIDI usage, BufferQueue is outside of SurfaceFlinger. If BufferQueue
allocates a GraphicBuffer from SurfaceFlinger, BnGraphicBufferAlloc will
create a BufferReference to hold a last ref to the GraphicBuffer, but
when the transction finishes, the parcel used in the transaction will be
destroyed and the BufferReference will be freed which caused the last
ref of the GraphicBuffer in SurfaceFlinger side goes away and then
destroy the GraphicBuffer. This leads to the buffer state between
BufferQueue and SurfaceFlinger out of sync, because in BufferQueue side,
the GraphicBuffer was just created and will be used later.

This patch add a sp<IBinder> of BufferReference for each GraphicBuffer
when created in BpGraphicBufferAlloc, this will make the BufferReference
in BnGraphicBufferAlloc stay still when the transaction finishes, which
also leads the GraphicBuffer be held. When BufferQueue free a
GraphicBuffer, the sp<IBinder> BufferReference will be set to 0 which
will free BufferReference and then GraphicBuffer in
BnGraphicBufferAlloc/SurfaceFlinger side, and will not lead to memory
leak.

In normal use case, since the BufferQueue and SurfaceFlinger are in the
same process, there will no Bp side exist. Thus, this patch will not
affect the normal use case.

https://code.google.com/p/android/issues/detail?id=54597

Change-Id: I812bbf046fd592a6dca1e4d157b459c9654835fb
Signed-off-by: Lingyun Zhu <lingyun.zhu@intel.com>
Revert "GFX-3D: Hold the BufferReference of GraphicBuffer in BpGraphicBufferAlloc"

This reverts commit 7a3802e7699164eb7760f354803ab59afbf42eab.

Change-Id: Ie29d5404c23ca8610f5fa3e5916fe1a124956ba0
Merge branch 'cm-11.0' of git://github.com/CyanogenMod/android_frameworks_native into cm-11.0