Display : Enable rotation on large screens

The auto-rotate toggle in statusbar is no longer present, so the check
is no longer valid.

Change-Id: I0a23e251b3cb793481d14ea8ad8a9079c7c0e962
Settings: Fix color picker ComposeShader view

The shader was not showing the proper combined gradients.  This is a
limitation of the ComposeShader in Android 3+ and has to do with the
hardware acceleration as described here:

'ComposeShader can only contain shaders of differenttypes (a BitmapShader
and a LinearGradient for instance, but not two instances of BitmapShader)'.
But, 'If your application is affected by any of these missing features or
limitations, you can turn off hardware acceleration for just the affected
portion of your application by calling:
    setLayerType(View.LAYER_TYPE_SOFTWARE, null).'

Change-Id: I8d945e37ed97c409a0cc7e9ec5570019545f0f68
Fix the spacing between displayed rotation angles

Before: http://goo.gl/QJ7hE
After:  http://goo.gl/V0alW

My suggestion: http://goo.gl/Sn4R5

Patch Set 1:    * initial commit

Patch Set 2:    * simplify code
                * fix code style issues
                * rename/delete strings
                * remove 'Activated.' before the values
                  when Auto-rotate screen is activated

Patch Set 3:    * remove display rotation unit string
                  and use the degree sign after every
                  value

Patch Set 4:    * code cleanup

Change-Id: I0319f8e84e4b278b2f720cbc77cecc280c82d461

Conflicts:

	res/values/strings.xml

Conflicts:

	res/values/strings.xml
Settings: Broadcast ACTION_DATE_CHANGED

Send ACTION_DATE_CHANGED when user change the format of the date

Change-Id: I89ef0354ae2b0825378a6e8939341c4eccf63e17
Signed-off-by: Jorge Ruesga <jorge@ruesga.com>
Check if the Activity is finishing before showDialog()

Check if the Activity is going through its finishing phase before
displaying the Dialog, because Showing dialog once the activity
is no longer in context will cause BadTokenException.

Change-Id: I58940e694f61cd79536abe2df60a0b745a7b806f
Fix "Add Network" show last selected WiFi AP Dialog

When user taps Wi-Fi add network button, the pop-up dialog is not empty (it shows last selected WiFi AP Dialog).
The above is observed after the following steps:
- Launch Settings application
- Turn on Wi-Fi
- Select any Wi-Fi Access Point which is not connected previously and change to portrait mode
- Press Cancel from the pop-up and select Add Network icon in menu

Because the "Rotation" operation will cause WifiDialog re-creating and the current settings
of selected Wi-Fi Access Point is saved before WifiDialog destroyed.
Then, the saved Wi-Fi Access Point is displayed when user tap on "Add Network".

It need to clear the saved Wi-Fi Access Point when WifiDialog re-creating.

Change-Id: I3e93943e5bee405329e309c3ec88a35ee9cafc43
Led Settings : Hex input for colorpicker

Allow users to specify hex color codes

Change-Id: I644b624d569e5c2fbb0fc48683c73041b4193d27
Fix dialog state handling.

Convert ApplicationLightPreference into a DialogPreference to correctly
manage the dialog lifecycle, e.g. when rotating the device. Also save
the user-defined color in case the dialog was open.

Change-Id: Ife00e1c4737fbf6710ccdaa1252def00f2831af3
JIRA:CYAN-914
Fix light settings dialog being unusable in landscape.

Change-Id: I38eeeafd1d8260ab4a7c8de9099a7e270c1462f2
Fix dialog not opening for app-specific notification light settings.

Change-Id: I8e8d098bcc07824803b9e9931595f5c4fdbabb7b
Colour picker text input field: wrong content due to alpha channel.

The field was, effectively, showing AARRGG instead of RRGGBB due to
the alpha component being non-zero. This change fixes that in a
generic way which allows for alpha channel handling even though I see
no use for the alpha channel for the notification light.

Change-Id: I5b71340f3b644c6f6b305dc66d1285cc77427bf5
Notification Light: Fix apps with same name not showing up

Applications with the same name didn't show up in the
notification light add-app-dialog (with Facebook's "Messenager"
and Google's "Messenager" being the prominent example here).

This happend due to the fact that the list of applications
was sorted by names only and inserts with collisions were
dropped.

This commit refactor notification light settings to use packages
instead of application semantics. Further the list of packages
is now ordered by human readable name followed by package name,
which avoids the collision.

Additionally we handle situtations gracefully where a package
has more than one launcher activity (Again for example,
Google's "Messenger" and "Google+" is in the same package).

Bonus: potential race condition in the list adapter was
fixed, concurrent semantics were emphasized, unused imports
removed.
Option to use volume keys to control media volume anytime (1/2)

Some users don't adjust ringtone volume often (e.g. only use toggle to
switch between silent and non-silent) mode. Having an option to
use the volume keys to control media volume anytime allows media
volume to be controllled/muted before entering a game or other apps
with sound in an undesirable location.

Change-Id: I6dbd25d1a14bcf5b1bf0b0468b96f4b4f8efdb14

Conflicts:
	res/values/cm_strings.xml

Conflicts:

	res/values/strings.xml
Add QSCP link to SystemSettings, add nice icons.

- Thanks kevdliu for your great work
- Thanks ATTACK for your icons!

Conflicts:

	res/values/strings.xml
	res/xml/system_settings.xml
Revert "Add QSCP link to SystemSettings, add nice icons."

This reverts commit 41eb77131ac3e9af4223a9305d50a33072e78792.
QuickSettings Customization [2/2]

Conflicts:

	res/values/arrays.xml
QuickSettings dismiss notification panel upon toggle [2/2]

Conflicts:

	res/values/strings.xml
QuickSettings: Add Network mode tile [1/2]

Conflicts:

	res/values/arrays.xml
	res/values/strings.xml
QuickSettings: Add Mobile data tile [2/2]

Conflicts:

	res/values/strings.xml
QuickSettings: Sorted tiles