make LinearColorBar themeable

Move colors to resources and use them instead.

PS2: Fix typo

AICP'fied.

Change-Id: I923e5daa219f302dc24e62faab666483109e6620
Signed-off-by: Dirk Rettschlag <dirk.rettschlag@gmail.com>

Conflicts:
	res/values/colors_custom.xml
Fix NullPointerException issue when user change

When info is null, we have risk to have access null point.

Change-Id: Ie6acee5c99d6297e31d46585435a735a38b19e82
Total and available fields missing in Settings storage menu

After formatting SD card or inserting an SD card the total and
available space fields in Settings storage are missing.
This fix add those fields after SD card has been mounted.

Change-Id: Id6c1d1963effdb9656c8eb1c567b913bc4d98bd2
Don't show "Eject card" if the card is not accessible

SD card is not accessible without removing the battery on some devices.
Remove the "Eject" options on those devices

Depends on http://review.cyanogenmod.org/62708

Change-Id: Iddfa72314f7c96579ddd98e8fb312236348b7c2d
Show "Eject card" for usb storage

Readd the "Eject" options if the SD card is mounted via usb.

Change-Id: I802cf4d20eb3b45ce068f89c22352f79999d593e
Data traffic details: use proper string for System UID

Android System ≠ Android OS (second is a "kernel" process).
Mind the numbers:
http://goo.gl/YnFvHa (actual "system" process)
http://goo.gl/XwoISO ("system" process displayed as "kernel")
http://goo.gl/sJ9yMi ("kernel" process with different traffic data)

Depends on http://review.cyanogenmod.org/63190

Change-Id: I6f6662b7adaee069ec5f29c6926b8fbce796917d
p2p: Fix for GC unable to scan GO after tear down.

A start of the search is not done on a group removed
broadcast event for mLastGroupFormed being set, which
would result in the Group Client not able to find the
GO , though a p2p_find is issued before a disconnect.
This is due to the fact that supplicant shall notify
the p2p device info only once per p2p_find.

To avoid this remove the conditions that is blocking
the search to happen and issue another p2p_find.

Change-Id: I4abad5c472808f9aa03e644eb1c6a26bfab8a4e6
CRs-Fixed: 504022
(cherry picked from commit b5da1dfa773904f1d7d4aaff407d3830098a9206)
(cherry picked from commit 86f8e54ec3cdac6b9474d462cfafbc894223a433)
P2P: Updates the P2P peer list when there is P2P State Change Action

In the current implementation the P2P window gets updated with the
Peers list only when there is WIFI_P2P_PEERS_CHANGED_ACTION Intent.
Thus the P2P status remains unchanged when there is
WIFI_P2P_STATE_CHANGED_ACTION intent. When there is back and forth
navigation to P2P window, WIFI_P2P_STATE_CHANGED_ACTION intent invokes
the onPeersAvaliable function asynchronously and updates the P2P status
and peers list.

CRs-fixed: 512821
Change-Id: I69b26ef72bf30f547bf8fb5580d440c5119df054
(cherry picked from commit 17edb35f25b01560a2fd8c159432a794c46765f0)
(cherry picked from commit f4a4708e50657c14412a9f370f023fd89cba8e6b)
WifiSettings: Handle DISABLED_ASSOCIATION_REJECT.

Upon receiving multiple association rejects for a network,
framework disables corresponding network providing reason
code as DISABLE_ASSOCIATION_REJECT. this is handled
in order to provide appropriate user experience.

CRs-fixed: 484247
Change-Id: I3d344068a58d2dfd82c9bc8b23f43fdf980cc4d9
Packages: Fix for SAP turn ON/OFF fails issue.

Turnig ON/OFF SAP repeatedly when WIFI is ON results
in command CMD_SET_AP being received in WifiStaEnabledState
of the state machine, which will not be handled and because
of this SoftAP is not turned ON and we receive no events
thus the check box remains greyed out/disabled.

To resolve this wait for WIFI_STATE_CHANGED intent before
re-enabling the SAP.

Change-Id: I1a37ac6406ea5e342d6dcb80654c2728fa447e57
CRs-Fixed: 525872
Settings/Wifi: Add support for Ad-hoc (IBSS) networks

If the WLAN driver can support IBSS mode, show Ad-Hoc (IBSS) networks in the
list of available Wi-Fi networks and allow to connect to or create new Ad-Hoc
networks.

This is merged and ported from CM-10.2, where it was split up into 3 commits.

Change-Id: Ib58d05d05ce00a77d5b88ee57007d38798d7b43d
P2PSetting:Avoid p2p_find on group removal event

Immediately after group termination p2p_find is being issued
from settings and this causing issue whenever user sends
connection request immediately after group_removal_event.

Change-Id: I6ae90a1d710e0e977a1dbc171398fd270dc30183
CRs-Fixed: 622597
Packages : Fix for Softap turn ON/OFF fail issue.

If Softap is enabled using third party applications which make use
of WifiManager APIs, Softap enable fails. This is due to improper
handling of Softap State change event.

To resolve this issue, handle the Softap state change intent with
proper initialization of variable "mWaitForWifiStateChange".

CRs-Fixed: 634896
Change-Id: I63f8845ec3e8ebfa8ec09a7b1a1bc4ee175336cf
P2P : Fix for P2P group name

When device is in Chinese language, P2P group SSID names will be encoded
into UTF-8 hex format. When displaying group SSID in UI Settings, this
UTF-8 should be converted back to UTF-8 binary format.
Implemented method to convert UTF-8 hex to UTF-8 binary format. When
group is created, it checks the hex format by looking '\x' sequence,
then converts to binary format.

Change-Id: I381b9e6c89ea4c82d41d2d4b69effe0d5e71d2e8
CRs-Fixed: 661989
Wi-Fi: Manage Wi-Fi AP priorities

AOSP has a basic LRU priority for Wi-Fi networks (last connected has more priority).
This changes added the ability of graphically set the priority of any of the configured
Wi-Fi networks through Settings -> Wi-Fi -> Advanced Settings -> Wi-Fi priority.

Port from cm-10.2:
* Added ic_grabber icons

Signed-off-by: Jorge Ruesga <jorge@ruesga.com>
Signed-off-by: Michael Bestas <mikeioannina@gmail.com>

Change-Id: Ief590e799cdb7ef760b631d0b22d9719f867393f

Conflicts:
	res/values/cm_strings.xml
	res/values/liquid_dimens.xml
	src/com/android/settings/wifi/AdvancedWifiSettings.java
Bluetooth: Handle BT search while rotate screen

Enable screen orientation in Settings app manifest.

CRs-Fixed: 519022
Change-Id: I74b70dafa1d8d12bf6770cb44a808cdf51555940
(cherry picked from commit 5e6cb7b4c30b4b7a01240b37395cd6c2edc9372b)
(cherry picked from commit 9d2319fda3df37730770c1fa55c9293a02198383)
(cherry picked from commit b77d906701dad6fd659b53008b422675afda3e31)
Bluetooth: Avoid window leak when screen orientation changes

Enable screen orientation change support in Bluetooth Settings app
during any Bluetooth Setting Activity. Otherwise, window leak may
observe while screen orientation changes.

CRs-Fixed: 556653
Change-Id: I8868f4c6e96277fd17484f810de6a700198a5287
(cherry picked from commit 43d4fc0bd35ee5573a8f25c980b812e32cd48172)
(cherry picked from commit 06f74dafa10ce9c1a61719e277ac72ea33e6deab)
(cherry picked from commit 547dcac07806559c5c884acc1f32b4e199447cb8)
Settings: Use solid actionbar

When the action bar is visible, use the solid holo dark theme used
 by the rest of the Settings app

Change-Id: I41deeaa1988d59e121e6e81bcf3f42c570341f0b

Conflicts:
	AndroidManifest.xml
	res/values/themes.xml
Separate Android Encryption Password from Lockscreen Password

This permits the use of a different (hopefully longer and more complex!) encryption
password, while using a simpler (and easier to type) lockscreen password.

Change-Id: Ib8c62c8eb4c86cd9e0117444231e8139c08ad1b6

Conflicts:
	res/values/custom_strings.xml