camera: add power mode support

Based on commit 7036d66bec7697160ba1b2e255f1e7fae0c8c435 from CAF,
branch ics_chocolate.

Change-Id: I8a60668b18980fd5e6f9dd341db5a8a63deb99d0
Fix Photosphere/Camera FCs

Photosphere is setting a few parameters "blindly"
while the API says it should check the device capabilities first.

On TF101 (and probably other devices) the camera HAL doesn't handle
FLASH_MODE & SCENE_MODE and so it sends the required RuntimeException
for these, which makes Photosphere FC the Camera app.

=> Fix: check device capabilities & ignore these 2 parameters if the device doesn't support them.

Fix based on following Team EOS patch: https://review.teameos.org/#/c/1598/

Change-Id: Idd80299802e9213a3c40414ace3d516d39f47783
hwui: Don't discard framebuffer on exynos4

The layers gets empty/not cleaned and redrawn on top of the preview,
causing beautiful glitch on homescreen, and drawing black instead
of transparency.

Change-Id: I633b104224c73c625f1193ee3dde41823cddc5bf

Conflicts:
	libs/hwui/LayerRenderer.cpp
Factor out preference-in-storage check to overridable method.

Change-Id: I2fff3192802f8a180330fda66388eda394334a5a
Treat default value that wasn't found as empty value.

Fixes http://code.google.com/p/android/issues/detail?id=33220

Change-Id: If22e8b245f688d922c168aa54c8acf743c0644d7
Wipe and re-create database on downgrade.

Not a very common situation but should fix some errors that could
 arise from flashing an old ROM over a new one, without wiping data.

Change-Id: I27f2a00396761105987830921bb3f8cb339d2171
Fix certain setting writes being incorrectly skipped.

If a value that previously had a very long value (over the 500 char
threshold) is now set to null, isRedundantSetValue would incorrectly
return true even though the value was changed.

Change-Id: Ia5304743024ec01024be98aa51ed260d38caf93c
Allow adjusting progress on touch events.

Change-Id: Ide0a7ae057a62f3631a32eeaa63f3e04dec5bf54

Conflicts:
	core/java/android/widget/AbsSeekBar.java
FWB: added screenshot delete action in notifications

allows deleting a screenshot from the notification
inspired from CarbonRom - initial from CM I guess

AICPfy:
brought in from KK

Change-Id: I67b7b9a7808ddb8c54ea4f3a45aad6d44833e1df