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
Display BTH connected status correctly

This patch removes incorrect condition.
(to not use LocalBluetoothProfile#isPreferred())
This condition uses the priority that already disconnected profile,
so this codition always returns false.

To verify this issue:
1. Turn on Bluetooth.
2. Pair and connect to BTH(A2DP/HFP)
3. The display now says "Connected"
3. Disconnect HFP profile
4. The display still says "Connected" but it should say "Connected (no phone)"

Change-Id: I9e2bfa6d23bf1be7587c9556b4b05459d02c4817
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
Settings: Add default value for display color control (2/2)

Change-Id: I50b684abe504c21ef49492f99b18873d75509697
Bluetooth: Release pan proxy object while coming out from tethering menu

A case where user is going into tethering menu & coming out repeatedly
(2000 iterations) irrespective of Bluetooth state(ON or OFF). Setting
application get crashed after 1386 iterations. Each time TetherSetting
& BluetoothPan object were leaked, because connection of the pan profile
proxy to the Service was not closed by tetherSetting while coming out
from tethering menu. Releasing the pan proxy object while coming out
from tethering menu to avoid memory/objects leak.

Change-Id: I06a5e1ed37a024695fddb1e95f62b72fd56510d3
CRs-Fixed: 622489
Bluetooth: Ignore the second button if one already pressed

Ignore the second buton if already one button is pressed,
this case comes when user is trying to press the both
cancel and ok for the pairing dialog.

Change-Id: I77516ec59a972b4451bb8cff69645f7b9089497f
CRs-Fixed: 624285
Fixes error message during pairing of HOGP devices

When incorrect pin key is entered by user in
the pairing pop up while pairing with a HOGP
device, no error message regarding the failure
is displayed to the user.

CRs-fixed: 618905
Change-Id: I1a5a8baf9ef6c71bf285a28b3e1839fe5ddbca95
Bluetooth: Increase allowed duration to connect to a profile

This patch increases the duration allowed between the first device
connection attempt (immidiately after bonding) and profile connection
after service discovery from 5 seconds to 30 seconds to allow
HOGP connections for slow connection conditions.

Change-Id: I5b17bd0bd2b560709e6e67e2d83f9bca7ea2509d
CRs-Fixed: 612105
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
Fix NullPointerException issue when user change

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

Change-Id: Ie6acee5c99d6297e31d46585435a735a38b19e82
Bluetooth: Acquire wakelock to turn on lcd during Connection

This patch acquires wakelock to turn on LCD display of DUT if screen
is off during connection access request for PBAP/MAP. Without this
patch it was observed that if screen was off, lcd remained off for
incoming connection access request from remote device and user only
was hearing notification sound without lcd being lit up.

Change-Id: I87c296fce4cd8e0c133f74169d991eee263fed08
CRs-Fixed: 650261
Bluetooth: Fix for device gets stuck in pairing

Fix for device gets stuck in pairing when trying to pair to two
devices one after the other or simultaneous. Now second pairing
is blocked when first pairing is ongoing.

Change-Id: Ib7e6788243a38b3a0dd864bee2b0797305468e27
CRs-fixed: 610056
Setting: Fix error when turn on wifi hotspot with long Chinese Ssid issue

The "error" is caused by beyond the limitation from driver layer
which wifi ssid characters can not exceed 32 bytes.

Add the codes to limit the characters of user input.

CRs-Fixed: 539994

Change-Id: I16adc3b08c86caf336b5272d27713134cb0d5211
Settings: Fix error when input WLAN Direct name with long Chinese name

Caused by beyond the limitation from driver layer which the
characters of WLAN Direct name can not exceed 32 bytes.

Add the codes to limit the characters of user input.

CRs-Fixed: 646426

Change-Id: I1ddf6d69940e0685c159e1b6329e0ee5fbbac222
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
Settings: give boot_completed receiver higher priority

We need it to start up as quickly as possible.

Change-Id: Iaa99b6519c46b3bd0b85adcd59bbfb76b4983b64
Signed-off-by: Roman Birg <roman@cyngn.com>
Settings : Launch only contacts picker for blacklist entry

Change-Id: I266d1ad7f1aab745728b33490268cb197188f2b3