add commit 'Merge Rework thumbnail handling into jellybean' from CyanogenMod/android_frameworks_base