Camera: Powerkey shutter (2/2)

Ported from cm-10.1

Including cm-10.1 camera commit:
aa4ae80a41fbab763891c5ef6d67a9e5b4bb981b Don't mess around with pref local ID for power shutter initialization.

Includes http://review.cyanogenmod.org/56986
PS2: Make Camera2 a privileged app
PS5: Sign with platform certificate instead of making it a privileged app.
PS6: Add write permission to PREVENT_POWER_KEY
PS7: Move PREVENT_POWER_KEY permission to CameraActivity
PS8: Revert to PS5

Signed-off-by: Michael Bestas <mikeioannina@gmail.com>
Change-Id: I0992baa558eefd306d00fbece59cb5c512d9448b
Camera: Cleanup hardware key handling

* Fix power shutter behaviour in camcorder mode
* Disable volume change while in panorama mode, volume buttons should only
handle camera operations while in the camera
* Add camera/power/volume key shutter handling in panorama mode

On devices with a hardware camera key:
* Disable power & volume shutter features
* Volume buttons control the zoom

On devices without a hardware camera key:
* When power shutter is disabled, volume buttons control the shutter (like AOSP)
* When power shutter is enabled, volume buttons control the zoom

Change-Id: I141946d5b6f5aec8b1e9a9f99270d30295596079
Camera: Handle keys only while in app

Thanks to Lars Greiss (SlimRoms)

Change-Id: I63f757d25260fba4683f494f8b4daf178a2b4e13
Merge "Camera: Powerkey shutter (2/2)" into cm-11.0
Merge "Camera: Cleanup hardware key handling" into cm-11.0
Merge "Camera: Handle keys only while in app" into cm-11.0
Merge pull request #24 from CyanogenMod/cm-11.0

merge from CM