Fix up notification LED behaviour

- Commit 5713307e3d2eb457ba148df3683ad09733727506 (in ICS) attempted to
  fix the problem that the notification LED wasn't reenabled after
  turning off the screen again, but introduced another bug in the
  process: If another pending notification with LED at the time when the
  notification with the new magic flag introduced by that commit (which
  was used by phone and MMS apps) was active, the LED still wouldn't be
  turned on at screen off time. Also, this commit didn't handle locking
  correctly.
  This commit essentially reverts 5713307e and makes sure the LED is
  reevaluated when the screen is turned off again.

- This change also makes the assignment of the LED when multiple pending
  notifications want to use the LED more clear: The notification with
  highest priority gets the LED. If multiple notifications with same
  priority exist, the most recent one gets the LED.

JIRA:CYAN-652
Change-Id: I1df0b40cca2af7a08c240677d22d2a95097b7184
Frameworks: push recents preload time a bit up

seems to be that older hw key devices need a bit more
time to preload the recents because sometimes it ends
up in an empty recents screen. Time delay was
a bit to optimistic. Set it to android default
value for short press.

cheers

Change-Id: I40343a351ea968ae7dc663f2f36dbfef9dde93f5
Frameworks: move emergency call above power widget

AOSP has it always on top (without PW and as well on QS)
so put it on top as well when PW is active so that it
does not jump on animation is consistent

Change-Id: I7524a43f9ea5d45b1af94c677ad365cfcf72f89c
Framework: Always show settings button option for notification drawer (1/2)

This also fixes a bug where the settings button was not showing the proper pressed drawable
and fixes the transparency on the ic_notify_settings_normal drawable to match the rest of the
notification drawer assets.

Also removes longpress PW toggle setting since it now defaults to this.

Change-Id: I1b7624fd3278504a07c79daab00babcb5f7b37d1

Conflicts:
	core/java/android/provider/Settings.java
Framework: Option to force keyboard to show enter key (1/2)

Original SlimRoms feature!  Not everyone likes emoticons :-(

Change-Id: Idc093d8fa14633ccf2817fadcfb09d32768445b0

Conflicts:
	core/java/android/provider/Settings.java
Remove opaque check in GLRenderer when preparing dirty region.

Since preserved swap is enabled, we need to clear the color buffer
when the scissor rect is prepared for a new process. This prevents
garbage to be present from the previous process in the color buffer.

CRs-Fixed: 391492, 403067, 405916

Change-Id: I1f72a3dee2f5d58a984f4cd367c9f7bf08ab9d6a

Conflicts:

	libs/hwui/OpenGLRenderer.cpp

[PATCH] Remove opaque check in preparing dirty region

Since preserved swap is enabled, we need to clear the color buffer
when the scissor rect is prepared for a new rocess. This prevents
garbage to be present from the previous process in the color buffer.

(cherry picked from commit 2b5e584e2615852b68a69bb529c6926190246b64)

Change-Id: I92a4fa35e0746f12fcd736e21fd30d9c4b644a8a
CRs-Fixed: 391492, 403067, 405916

Conflicts:

	libs/hwui/OpenGLRenderer.cpp

Enable scissor when preparing dirty rect that is opaque

Now enabling scissor before setting it in the opaque case, previously was not doing so.

Change-Id: I1ea904cf01603096e423556090564291ab712d36
CRs-Fixed: 465346
Depends-on: 278453

Remove opaque check in preparing dirty region

Since preserve swap is enabled, we need to clear the color buffer
when the scissor rect is prepared for a new process. This prevents
garbage being present from the previous process in the color buffer.

CRs-Fixed: 465346
Change-Id: I98f2009748244751c4b56af8afbdfeb645c13230
Fix layout of MultiWaveView and GlowPadView.

If the calculated size of the rings is much smaller than the measured
size (which is happening e.g. on mdpi 600x1024 tablets), the glow pad
appeared shifted to the right.
This happened due to the insets being calculated as difference of
available and needed size, and later on being added to the available
size. Example numbers (Nexus 4 with density forced to 160):
- computed size in onMeasure: 768x505
- scaled size in onMeasure: 505x505
- thus, insets are calculated as 131/0
- in onLayout, placementWidth (364) and max target width (108) are much
  smaller than width (768)
- thus, center is calculated as 131 + (768 / 2) = 515, thus shifted to
  the right

Fix that by not using width in the calculation, as the inset size
already takes it into consideration.

JIRA:CYAN-829
Change-Id: Ifc2a93214f812f554a8fed3243eed66aec9f00c9
Frameworks & SystemUI - additional DC-HSPAP support

This commit adds some more informations about Dual-Carrier HSPAP
It allows displaying a "DC" icon on status bar for compatible devices
and add a "DCHSPAP" value in state phone
patch 1: add TelephonyManager to fix build
patch 2: modify ServiceState
patch 3: switch to cm_strings
patch 4: fix a mistake
patch 5: upload a new set of icons, a bit prettier than previous
patch 6: update icons (more opacity to match colors)
patch 7: removed drawable-sw*

here is a screenshot for example: http://imgur.com/mQ2du3l,PSyHoqC

Change-Id: I77d05e23c8ad3efdfeb19cf06ed92e7c57105ebe

Conflicts:
	packages/SystemUI/res/values/cm_strings.xml
TelephonyManager: hide NETWORK_TYPE_DCHSPAP

Change-Id: I77e6d537d5ebbe67bac26c6ef6d0dda498640ca0
Fix Logical error

Change-Id: I0b07ea92cd9b747772bf1c2376a6a801d524b7d0
Fix broken TRDS "multi-select" actionbar on hdpi devices

Change-Id: I0253ecc057e0e66174149694ff300de7c277b1b9
Make character picker for QWERTY keyboards use HOLO theme

Also, removed the cancel button. Instead, touching outside will close
the dialog.

Change-Id: I20c1d22b131a92e2e2022d054b4141a2b61c7dd8
EthernetDataTracker: Set network available on connected

This change fixes state mismatch found in the bugs below,
and makes the code look consistent with disconnect().

In startMonitoring(), reconnect() is called before mNMService.registerObserver().
Then dhcpThread.run() could finish without getting interfaceLinkStateChanged() callback.
In such a case, mNetworkInfo has connected but not-available state - which is contradictory.

Bug: 8113933, 8291000, 8291039
Change-Id: I29d74f8d09dcffb97d6c9f8198811bca046fef0c
Fix double settings race condition

Change-Id: Ib47fbb6c4b4a69fc981a632cbd4c5e27621019c2
hwui: This code should only be enabled with QCOM_BSP

This brings back Change-Id: I1a06ac54a8ce2dccbf4a67424b0cbb6e7dd21e8b

Change-Id: I253884b15f52f403efcc46e66bc93cf85e91c82d
AudioService: Remove STREAM_NOTIFICATION from ringer mode streams

Change-Id: Ie8d25743b27839fa2bd4e9ae5d3d0a49410ac5b4
JIRA: CYAN-344
Issue: https://jira.cyanogenmod.org/browse/CYAN-344
Signed-off-by: Jorge Ruesga <jorge@ruesga.com>
[2/2] Permit home button wake to be configurable

Change-Id: Ie52247d5c23c8f840ababc880dd41992049cefd1

Conflicts:
	core/java/android/provider/Settings.java
Improve auto-brightness handling

- Add a setting to control the auto-brightness algorithm responsitivity
- Make the algorithm react much faster when the ambient brightness
  increases quickly, e.g. when receiving a call in bright sunlight.

Change-Id: Ic608901c476609dde69cae982228c09567140a83

Conflicts:
	services/java/com/android/server/power/DisplayPowerRequest.java
	services/java/com/android/server/power/PowerManagerService.java
Profiles : Allow nfc override (1/2)

Part 2 : http://review.cyanogenmod.org/#/c/37013/

Allow user to override nfc state via profiles
Request jira : https://jira.cyanogenmod.org/browse/CYAN-989

Change-Id: Ief7fa4ab83527f488fbd8c0bc96448a2a2cde6fb
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 were 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.

Please note that idc with "keyboard.orientationAware = 1" is required
for the built-in input device that provides the volume buttons.

Change-Id: I19cc60cb0acb0005ab13fa069f52e3d468d694e7

Conflicts:
	media/java/android/media/AudioManager.java