perf: Improve performance profiles

 * Performance Profiles is going to grow into a much more powerful
   feature which can apply advanced optimizations or power saving
   techniques depending on both the state of the hardware as well
   as the current applications in use.
 * Refactor the original code and move it into PowerManager so
   that it's managed from the same place.
 * Implement "automatic performance profiles". This feature will
   automatically select a profile when specific activities are
   running. Currently this list is static and engages performance
   mode for several benchmarks (trollface).
 * Added support for a new power hint, POWER_HINT_SET_PROFILE.
   Currently, these profiles are fired using a property trigger
   in init. This is easy, but the PowerHAL can do more.
 * Moved the setting to Settings.Secure and also wrapped calls
   to the service in the DEVICE_POWER permission. Nobody should
   mess with this stuff except the system.

TODO:
 * Allow user configuration per-app.
 * Implement an advanced power-saving mode.

Change-Id: I140ebc0648c4cf05900e005923247c3180be8c93

Conflicts:
	core/java/android/provider/Settings.java
	core/res/res/values/config.xml
	core/res/res/values/symbols.xml
FW_Base - Dispatch keys to a device specific key handler

Injects a device key handler into the input path to handle additional
keys (as found on some docks with a hardware keyboard).
Configurable via overlay settings config_deviceKeyHandlerLib and
config_deviceKeyHandlerClass.
DeviceKeyHandle: The device should consume only known keys
When the device receive the key, only should consume it if the device
know about the key. Otherwise, the key must be handle by the active app.
Also make mDeviceKeyHandler private (is not useful outside this class)
DeviceKeyHandler : Allow handling keyevents while screen off
Some devices require the keyevents to be processed while the screen
is off, this patchset addresses that by moving the filter up in the call
hierarchy.

Change-Id: I499392b743d975e8a2a602fc3e3d953a6ff6e009
Signed-off-by: Stefano Mura [STELIX PippoX3] <STELIX@gmail.com>
QuickSettings : Properly restore lockscreen tile state

The keyguard lock relies on device policy manager service to be active,
currently it fails because it tries to request before its up. Fix that
by registering the request in a receiver

Change-Id: I15e0d980ecf21c8316f4a771e93f4b520c556115
Add system setting for t9 search input locale

Change-Id: I780b3cca1ad2da396b76464a6dab5cc53f621ed2
ProximityWake : Add support for checking proximity when waking device

Change-Id: Ia5ff446d88435773acccc7467e66009000dc20cb

Conflicts:
	services/java/com/android/server/power/PowerManagerService.java
Framework : Fix proximity wakeup reference

Change-Id: Ia40ca6fbf6e37fbb3996f2384f725c30b88c2131
Filter spam notifications

Conflicts:
	packages/SystemUI/AndroidManifest.xml
	packages/SystemUI/res/menu/notification_popup_menu.xml
	packages/SystemUI/res/values/cm_strings.xml
	packages/SystemUI/src/com/android/systemui/statusbar/BaseStatusBar.java
	services/java/com/android/server/NotificationManagerService.java

Change-Id: Ibf2377cd7491c7e0e9e9c9657e9e65eef1876ee3

Conflicts:
	packages/SystemUI/res/menu/notification_popup_menu.xml
	packages/SystemUI/src/com/android/systemui/statusbar/BaseStatusBar.java
Revert "FB:  Add transparency to Glowpad background [2/3]"

This reverts commit 7967745d2d754f436f9578db067701f74e4b2c18.

Change-Id: Iecd2336d152fc7ed9cc24751cf230b7f874a3600
Make incoming call screen style configurable (1/3)

Change-Id: I12e108e11afcc87cd0ed717dbc6f8a2a2c0f1743
Be sure to shutdown the proximity sensor after display wake

This fixes:
http://review.cyanogenmod.org/#/c/66657/

Change-Id: I1768f13cb48c3e056d0e137642690fc3d650c4ab
Proximity : Check proximity flags only if from native

Change-Id: Id1be619e638de6a45252d8390eab6e38bd5de5a7
LockscreenTile : Don't rely on DEVICE_POLICY broadcast

The current trigger used for initialization is too finicky and doesn't
work on some devices. Switch to trigger based on instantiation of the service
inside the delegate instead.

Also fix inverted drawable state.

Change-Id: I8439ed50281de805ae68fe7b5a81220475d98022
Filter Notifications : Adjust string

Change-Id: I797cef15fcbd2ebca1d411a71cae75aaf3b478f1
PowerManager : Make proximity check opt-in

Change-Id: I7cf64a82530da2e655018e43683ba7a5584d54f8

Conflicts:
	core/res/res/values/config.xml
Merge remote-tracking branch 'origin/overscroll' into kitkat