Hardware key custom rebinding (1/2)

Framework changes to allow rebinding of the actions performed on the following
key press events: Home long-press, menu press, menu long-press, search press,
search long-press, app-switch press and app-switch long-press.

The available actions are: Nothing, open/close menu, recent apps switcher,
search assistant, voice search and in-app search.

Patch Set 1: Initial port from ICS [done by Konstantin Koslowski]
Patch Set 2: Added 'assist' (search) key customisation
             Option for ICS-style in-app search, in addition to jellybean-style
             search assistant.
             Fixed double haptic feedback on virtual key press.
Patch Set 3: Checkbox to enable/disable all custom bindings.
             Home long-press defaults to no action on devices with
             an app-switch key.
Patch Set 4: The recent apps list will be preloaded on the initial down press
             of whichever key to which it is bound.
Patch Set 5: Fixed menu virtual key press sometimes performing the custom
             action bound to the menu key instead of just opening or closing
             the menu as it should.

Signed-off-by: iceandfire <arhamjamal@gmail.com>

Conflicts:
	core/res/res/values/public.xml
	policy/src/com/android/internal/policy/impl/PhoneWindowManager.java

Change-Id: I72c0d220a09d79230bfa299e0521ed693e5c25f1

Conflicts:
	core/java/android/provider/Settings.java
	core/res/res/values/config.xml
	core/res/res/values/symbols.xml
allow wallpaper cropper to read sdcard

Signed-off-by: ChampionSwimmer <championswimmer@aokp.co>
Allow hardware overflow key to be show by default.

Currently this is controlled by a system setting, but there is no way to
set a default value for the system setting. This is very useful to have
for devices that have no hardware menu key.

Change-Id: I94212def19d3e2224d79d3a89e1e2d3b2883da21
Fix SELinux.java doc errors

This fixes five errors when building the Java docs. It also
removes two obsolete lines.

Signed-off-by: Richard Haines <richard_c_haines@btinternet.com>
Change-Id: I814411cbc8d16eaed99a1389f5487529e36e647b
Replace SEAndroid with SELinux.

Change-Id: Ibbe544a9f025d71ad416bc01cee2145b62d7b2d4
Signed-off-by: Stephen Smalley <sds@tycho.nsa.gov>
Fix headset detection.

Original CM Commit below by Shelnutt2
Services.jar: Reworked computeNewHeadsetState function to
set state in a manor used in ics. This allows states such
as 129 and 130, which are used for 35MM_HEADSET to be
correctly registered as a new state.

Change-Id: I3bd1ec17d0cd184593edf330f482f09396785e76
Turn off carrier provisioning by default

Whether or not to use carrier provisioning is a setting hidden to the
end user that is currently not set. Unfortunately, on some carriers that
may result in it being set to yes, or effectively set to yes, without
other accompanying changes that must occur, such as setting a tethering
apn and possibly having a carrier provisioning app, resulting in hitting
a paywall when a tethering plan exists, or, worse having nothing happen
at all when you try to tether since the data doesn't have an apn set.

Change-Id: I3b5b3cc86e3325302411f46e3fd5f7a7c1b9f57e
Enable custom actions for double-tap home

Change-Id: I041e7ab3853b356ddbdab2524f096546319276f9
PhoneWindowManager: add missing hardware custom key binding code

*original code by Phil Tunstall http://review.cyanogenmod.org/#/c/27963/

*Improvements to code made by CyanogenMod and rebased for kitkat here
 https://github.com/CyanogenMod/android_frameworks_base/commit/3b6110478e8fca756ffeded437e1d401e9057b06

*Part 1 of code merged here
 https://github.com/AOKP/frameworks_base/commit/aabea3b3422e64cea8eea338b31ecb3745e7bc10
 https://github.com/AOKP/frameworks_base/commit/4fad16a04396998756992255c0216959b99ca115

*Also depends on http://gerrit.aokp.co/#/c/13605/

*Current button actions for home can be set via fw/base overlay.
 This is very useful for devices such as m7 that have no menu key
 since actions like double-tap home > menu can be set. Once RC is
 implemented, the ability to change actions on the fly can be introduced.

Change-Id: I5cff02037bba4eabc924c978516f95b3a371955f
Signed-off-by: Jonathan Steadman <xxwhitehawk@gmail.com>
Use white switch thumb activated drawables, not holo blu light.
Follow up change 6e37571ac190c4fa69216a36f7f2467b2c3496d9
Smooth Spinners: Makes the loading "spinner" animation smoother in non-holo apps

The loading "spinner" animation is quite jerky by default when the progress xml's from
drawable are called in applications that don't use the holo progress animation. The holo
"spinner" animation is already smooth by default. This makes every other "spinner"
animation smooth.

We've been changing this value in all ROM's we release, both AOSP and CM based ones
as well as stock ROM's, since it gives a more polished look to the entire system. In the past
3 years we've been using this small tweak we have not noticed anything that would
adversely affect battery life or system operations as a whole.

Signed-off-by: Sar Castillo <sar.castillo@gmail.com>
Sounds: remove misplaced/duplicate file

Change-Id: I4b6cc606735b1bd56dcccc11472f42aa0e5ef76b
Remove duplicate notifications

Acrux=Antares and Bellatrix=Betelgeuse.

I'm guessing these are duplicate due to differing
names. I believe Antares and Betelgeuse are the names
in AOSP, so leaving those two.

Change-Id: Ie58b20039bb4343c9907fc5bc31e099fd942bb87
KeyguardServiceDelegate: disable DEBUG

Change-Id: Ia5476563f6ed7f9e3175233994676c038b3a8f67
SystemUI: re-implement statusbar brightness slider

Change-Id: I96db3d8f40adf3726f4140c3ad3a7122e0ad6add
Signed-off-by: Roman Birg <romanbirg@gmail.com>
Signed-off-by: iceandfire <arhamjamal@gmail.com>

Conflicts:
	core/java/android/provider/Settings.java
KeyguardViewMediator: Play lock screen sound sooner

When the screen is locked, there is a long pause before the lock
sound actually plays. This makes that sound happen much sooner.

Change-Id: I62547a183d68b93a33651c4078b5788d324055a9