Bluetooth: Set alias name only through Rename option.

Set the alias name only when user is trying to change the
name using the Rename option of paired device.

Conflicts:
	src/com/android/settings/bluetooth/CachedBluetoothDevice.java

CRs-Fixed: 539420
Change-Id: I415b6a962d8e7884b67d37b94c04df19e2c23012
Manual provisioning clean up

Clean up the code used for Manual Provisioning for
Stability.

Conflicts:
src/com/android/settings/sim/SimSettings.java
CRs-Fixed: 719499
Change-Id: I0c459da34d36bc2584c43113ddb59659e69a7959
Wifi: Fix setting application crash

Bellow commit causing setting application crash
"Id5c5133161d7bfbbf68e349886ca62aa5c15e263"

For saved profiles, wifiInfo is null need to validate wifiInfo
before trying to get IP address.

Change-Id: I9685393402d8785aa792049e96dc092970fee37c
CRs-Fixed: 730397
Bluetooth: Destroy BT Dialog on BT power off.

Check for Bluetooth off Broadcast to destroy disconnect
dialog when Bluetooth is turned off from power widget.

CRs-Fixed: 579028
Conflicts:
	src/com/android/settings/bluetooth/DeviceProfilesSettings.java

Change-Id: Ie556a17c7d574f77da5181c08705648ebf5733cc
Bluetooth:GAP: Handle exception while unregistering the Receiver

Handle the IllegalArgumentException while unregistering the
Receiver.

Usually when user presses both cancel and okay for the disconnect
dialog, OnClickListener will be called twice for both options,
and for the second time it is expected that receiver would have
already unregistered.

Change-Id: I36e30d551df76b7cfd1754305a1087578fd4a275
CRs-Fixed: 595648
Bluetooth: Pan fixes Squashed commit of the following:

commit e4a4007eeb640c72c052f87874a369563dce8668
Author: Nitin Shivpure <nshivpur@codeaurora.org>
Date:   Wed Oct 23 17:54:14 2013 +0530

    Bluetooth: Fix to show internet access as marked when pan is connected

    isPrefered is always true for PAN. So internet access menu checkbox
    is always marked on. Marking internet access menu checkbox based on
    pan connection status should solve this issue.

    Change-Id: I4343cc6f1b46377caa54aa3d39c08489ff14adac
    CRs-Fixed: 550731

commit 4e5a8decfdbb119b4fa4806f68e098dd9844e700
Author: Nitin Shivpure <nshivpur@codeaurora.org>
Date:   Fri Sep 27 16:03:01 2013 +0530

    Bluetooth: Fix to connect PANU from the internet access menu

    isPrefered is always true for PAN. So PANU connect fails,
    Once user clicks on the internet access menu in Profiles
    Setting. As PAN is not auto connect profile, So PANU should
    connect from the internet access menu in Profiles Setting.

    Change-Id: I6007c848e7c2703dc97f7f2113356a7aaeed0a0e
    CRs-Fixed: 545350

commit 3164ad62c3ee18f626417aa4bddf450de657a86b
Author: Pradeep Panigrahi <pradeepp@codeaurora.org>
Date:   Mon Apr 8 13:32:51 2013 +0530

    Bluetooth: Set isPreferred to true for PanProfile Connections.

    isPreferred is always true for PAN profile so that DUT can
    initiate connection with remote device. Curretnly we are
    returning true only when pan profile is in connected, so
    it will return false when pan profile is not connected and
    will never initiate connection on click.

    Change-Id: I7c789add73ca944d074b0ecd8af223f6d61b547a
    CRs-fixed: 463887
    (cherry picked from commit ca3988a7394eb189835647a5aaa04707fe5c2517)
    (cherry picked from commit ea5ce47bf7b918affc66467adf4e38b1c870e86f)
    (cherry picked from commit 2a3bfb2ed0102de6aa6e659ee7714ce8fcec25cd)

Conflicts:
	src/com/android/settings/bluetooth/DeviceProfilesSettings.java

Change-Id: I1c5eac11115d2e77262aa78f93fbbd349f5e001a
Bluetooth:apps: Fix to avoid taking space as name upon orientation

This fix is to avoid taking space character as a name in the
BluetoothNameDialogFragment upon orientation change from
PORTRAIT mode to LANDSCAPE mode and vice versa.

Change-Id: Ia66f27bb9b06739e42d73b15745c12a42512a1fc
CRs-Fixed: 650910
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
SAP: Proper device name in high security pairing dialog box

In the pairing dialog box, there is no editable text option for the caption, hence
we need to use static string which was appearing as junk characters sticking with
the remote device name which is is already displayed in next line so no need to use
dynamic string again anyways.

Change-Id: I45c4b3ebcabd38dff6ee84a82fd6fe082f36400f
CRs-fixed: 735774
Bluetooth: disable scan icon when BT state is off

Usually onScanningStateChanged function should take care
of disabling the scan icon when the scan is completed.

But When the BT scan is going on and try to switch of the
BT, as onScanningStateChanged function doesn't have the
reference for scan icon it will not disable it, so disabling
is taken care in BluetoothSettings on receiving BT Off state.

On receiving BT Off state, disable the scan progress icon only
when available device category is present.

CRs-Fixed: 543777,596214
Change-Id: Ib827903d4f5c80eeb6ac8a06fb1a945140dd20c9
Settings:Removed acceptance of Blank/NULL Alias Name

Added TextChangedListener to Remote Alias Name to verify whether
it is atleast 1 character long and not a Blank character.

Change-Id: I56c0ce1636430e6a238bd7f13e45ee318b9f41da
CRs-Fixed: 736512
AppOps: add Chinese support for AppOps settings

Add Chinese support for AppOps settings.

Change-Id: I14d2923868b2cc89370834d3e01ab67a9da5d594
AppOps: fix mismatch between English and Chinese

There is "toast windows" item which exists in English but missed
in corresponding Chinese arrays in Android Settings. The missing
item will cause mismatch for the items after it.
Meanwhile, this change does some modification in both English and
Chinese to satisfy requirements.

Change-Id: Ic29261f02f23d6d675e829ba3df2b2a023f892cd
Msim:Use phoneId to get Channel50 message to updateareainfo.

In Multisim gettings, get received channel 50 message based on
phone id to updateareainfo in msim settings.

Change-Id: I1d104f48d38f63430daa5e7ed1e2fa06248da27d
CRs-Fixed: 732899
Remove duplicate and add comments for SIM PIN messages.

Remove duplicate sim change failed string and add
comments for sim pin enable/disable failed messages.

Change-Id: Iaef56b2be063784f7470e46e6b735baf088fed63
CRs-Fixed: 736956
Settings: Add IZat location feature.

Add IZat "Accelerated location" item in "Location mode" page in
Settings. The feature can be turned on and off with a toggle switch.
CRs-Fixed: 584373

Conflicts:
res/values-hi/strings.xml
Change-Id: Iddd8863536b9f85b36a59284b4b1f16f11a1e40e
Start intent with package name.

Intent needs to bind to package before
it can be used

Change-Id: Ib6e902ee1c67475c6f779c8788a596b11458998b
Settings: Add charge mode for usb settings

Add charge mode for usb settings, once select "Charge mode", property
"persist.sys.usb.config" will be set to "charging", device only can be
charged.

Conflicts:
res/values/strings.xml
Change-Id: I6d88ad8201f2f52be948e07fd1e9de9b4caf808d
Bluetooth: Fixing incorrect Remote name during pairing

While pairing when the pop up comes to accept the
connection, DUT wasn't able to display some
special characters of the remote name.Fixed this
issue by parsing the HTML tags of the special
characters in the remote device name.

CRs-Fixed: 736532
Change-Id: I6442db9eacb04bacaac9e76dc92d02c784c29f5e
WPS-PIN pop-up is disappearing from GUI when rotate the device

WPS-PIN pop-up is disappearing from GUI when rotate the device.The
Create dialog for WPS_PUSH and WPS_PIN is implemented as in the
WifiSettings.

CRs-Fixed: 725630

Change-Id: I6a0a4fca89285ea2a69e81d181a93f91485444d1