platform: Fix the gid for the theme manager service

It was mismatched with fs_config, resulting in attribution of the
"-1" gid

Change-Id: Ia6d55af0b39f659da2965f9bc0bda0df5c775ba4
Code Cleaning
Merge pull request #86 from Anu6is/cleanup

Code Cleaning
StatusBar: Scale date text by 1dp.

looks better on 2 line view.
Merge branch 'jb43' of https://github.com/ParanoidAndroid/android_frameworks_base into jb43-legacy

Conflicts:
	packages/SystemUI/res/values/dimens.xml

Change-Id: Iccaa8dddbaf3ed5865c13c2838490aa0ff2cb738
PhoneWindowManager: Hardware key handling fixes and cleanup

-   Call cancelPreloadRecentApps for long presses and double taps of the home
    key at the right time based on the assigned actions.
    (Reverted Ibd16ff07b9910605c95180b54040f3e2b78939cb as the issue is fixed)
-   Do not allow any menu key events through to apps if
    mPressOnMenuBehavior is not KEY_ACTION_MENU.
-   Don't cancelPreloadRecentApps when menu key is released after a long press.
    (Reverted Idf1d27aa725547e0ddc44905e27da6c1b4540fab as the issue is fixed)
-   For the menu, app switch and assist keys don't cancelPreloadRecentApps on
    long press if the long press has no action assigned to it.

Patch Set 2: -  Fixed not cancelling preload on long press of home when double
                tap is bound to recent apps.
             -  Reduced delta against AOSP.
Patch Set 3: -  Do not perform long press action when key continues to be held
                down after a double tap on home.

Change-Id: I3cc8f9528e5dbd3e0b78308b03440abd9d9351f6
PackageManager: Let system-defined permissions take precedence over settings

If a permission was already present in the device's settings due to having
no prior system definition, and the system tried to take it over
(after a version upgrade, for example), it'd fail, since the saved
value would clobber the one previously read from the permissions XML.

This breaks system-behavior changes (gid grants, in particular) unless
the user performs a factory reset after upgrading, which isn't acceptable.

Change-Id: If2e44110f6db735ad29cdf1086e814bd1299e290
Navbar: Fix MDPI & HDPI landscape layout

Before: http://i.imgur.com/89SmFbX.png
After: http://i.imgur.com/UbuAggD.png

Change-Id: I6623cb97881313886de39a67baa98f7bd4b0696a
Fix hdpi/mdpi statusbar layout

Fix hdpi/mdpi statusbar cut-offs
Previously, the QS/NOTIFICATION toggle was cut-off when halo and clear-all button were aviable at the same time

SystemUI: Increase hdpi/mdpi statusbar header margins
SystemUI: new drawables to fix signal bar color when data is off
Credits to @szlkiev & @garwedgess / PAC-man
Update Readme

Change-Id: Ib377587184782b01686a0441e2fa6625b66eda11
Revert "Update Readme"

This reverts commit a8550553e3733ec24aa2f4df0662229adf62eaa1.

Change-Id: I534cf55834fe0fc26e2bf9b38707bf1a6f7a89f4
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
Bluetooth: Support  HFP Client role on Bluedroid.

Implementation changes to support HFP Client role
on Bluedroid stack.

Change-Id: Ie37e95d3b0e3f785af818fb495c835e420792f4d
Re-implement orientation aware volume buttons at lower level

Rework of http://review.cyanogenmod.org/31979

Fixes:
1. inconsistent volume button behaviour depending on app in use
   - the buttons not swapped for some NDK/OPENSL ES apps like
   e.g. MX Player
2. the function of volume buttons on external input devices like BT/USB
   keyboards should not be affected by the main unit orientation

This commit finishes http://review.cyanogenmod.org/18273 - use of system
property has been replaced with config push via JNI as suggested during
the original review.

Patch Set 2: Circumvent the need for "keyboard.orientationAware = 1" idc
Patch Set 3: Don't leak implementation details outside InputReader

Change-Id: I19cc60cb0acb0005ab13fa069f52e3d468d694e7
Camera button support (1/2)

Add new bitmask for Camera button and "hasCamera" boolean.
For those devices that have dedicated Camera key
(like Sony ZL/ZR/Z1/...)

Change-Id: I1a6681664f9f3fd3f30221ba10b082cb5f8cafca
Camera button support: make it actually work

Previous commits were merged so fast that I didn't even
added the code that actually DOES launch the camera.
Let me fix that.

Change-Id: I4fcb3c46e5fd50e273dcf19fd3eb35a3f9d979e0
Settings.java: Re-orient volume buttons

This part was left out in the first commit

Change-Id: I0c5f45ae030368c1aa2c6a055013780eadd49be6
Merge remote-tracking branch 'pa/jb43-legacy' into jb43-legacy

Conflicts:
	core/java/android/provider/Settings.java