Add an option to change the device hostname (2/2).

This adds an option to modify the device hostname used
in ip resolution. This is useful when connecting to the
android device in a dynamic dhcp environment.

Conflicts:
	res/values/strings.xml

Change-Id: Ibc145b74036617248d4f33c6866cc9c8a8cc8974

Conflicts:
	res/values/cm_strings.xml
	res/xml/development_prefs.xml
Settings : Switch state fix

Since the switch views are shared, we need to recreate them
in order to prevent from being reused as they don't share state.

Change-Id: I4d7038f37883e1791c8c2b0009f0adb85ebb2b88
settings: volume rocker control (wake up and volume) thanks to

CM and omni for the proxy sensor idea

Change-Id: I3dbb8c276fb7c73c8e3ced1624a1ff8e03d9f4ca

Conflicts:
	res/values/slim_strings.xml
Settings: safe headset volume option (2 of 2)

difference to CM and our old implementation added a warning
dialog. A bit extended due that we will have in future other
warning dialogs in soundsettings as well

Change-Id: I6546403484fd773abd9560a8405d75bb682f8b62

Conflicts:
	res/values/slim_strings.xml
[2/2] Power connect/disconnect notification support

Change-Id: If2103d5cf2a58d5dda7e83853ef681872795c710

Conflicts:
	res/values/slim_strings.xml
Add Camera sound toggle [1/3]

Change-Id: I77e2259f753ec8a37e5dcc97df100b588a45d3b0

Conflicts:
	res/values/slim_strings.xml
	src/com/android/settings/liquid/SoundSettings.java
Quiet Hours (2/2) thanks cm

remove as well depreciated ontreeclick

Change-Id: Id61ced473589e1f4a6ca30e4d3302c01f7b91ae2

Conflicts:
	res/values/slim_strings.xml
Settings: less notification sounds (2/2)

Change-Id: Icd035c06e5955880c73687e5b1407d54b96e1271

Conflicts:
	res/values/slim_arrays.xml
	res/values/slim_strings.xml
MediaScanner behavior on boot (3/3)

Lets you enable/disable/ask (with a notification) media scanning on boot.
Can speed up boot and reduce initial boot lag from MediaScanner

Change-Id: Ib09f2de2b3ae3e62eb59be681cf48e0bce14ef17

Conflicts:
	res/values/slim_arrays.xml
	res/values/slim_strings.xml
	res/xml/settings_headers.xml
CellBroadcast: Disable App links on wifi-only devices

PatchSet 2: Remove unnecessary check

Change-Id: I359b5fef2932dfa072b72384edf9ba730a1f71a1
Signed-off-by: Jorge Ruesga <jorge@ruesga.com>
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)
Bluetooth: Handle pairing Cancel intent.

Receive Pairing cancel intent and clear pairing request
from notification window.

CRs-fixed: 463362

Change-Id: I63c9299edca4356485f26cbc6332e3be9bdfbf17
(cherry picked from commit fc82c5a6a3e74aeba6139e0ccf48f634fd970e62)
(cherry picked from commit dc299471edd42a5b30c0f54ef8d33730e33d03a3)
(cherry picked from commit 32f973cbe79d2474d0815d7dd90c6960af120b3c)
Bluetooth: Security: Add Null check during pairing cancel intent.

Added null check, so before posing event we can restrict events,
if cached device list is empty

Change-Id: I458d181abe5eec2497b80b1713ddbc3502b79786
CRs-Fixed: 546364
(cherry picked from commit 7d7222c3e5c1054b4e2f3e59cc40cb182a72b040)
(cherry picked from commit 8ce523155dd030d82c32cf502d317023b017645b)
(cherry picked from commit 938686e749bca911e5f63150223116d1c381da8e)
Bluetooth: Remove out of range devices after ScanComplete

Change to remove device from UI when Bluetooth of remote
device is off or not discoverable anymore. Without this
change a device that discovered previously is available
in available devices list always, though the remote device
is not discoverable anymore. The current change updates
available devices list on scan complete removing the
devices that are available in cached devices and are not
discoverable anymore.

CRs-Fixed: 523374
Change-Id: Ia250d52e6fb7a69af242c961d33027f1e724ab25
(cherry picked from commit fee7b100ff7ac4eb7117ec1bc5c592d0c7adbbf8)
(cherry picked from commit 38d07978c7fb4f40af96b9fb96af09a64ce5bfff)
(cherry picked from commit 28a27af31eac45f4b3fe5932240dc437a37dda5c)
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: SAP: Add SAP profile support in Settings APP

- Handles 16 digit Authentication
- Added Handles SAP profile connection status changes
- Added SAP Disconnect from server related changes

Change-Id: I655a8c8bcdcc275c5d95c8ddd3d7bac2691fa818
(cherry picked from commit d17f03934b2582637f9d059fccccaabbc4203994)
(cherry picked from commit 26fd639eaeacb7dc5d82c9ef9cf5b5eb5fc70b4f)
(cherry picked from commit c63c73ebf900091b67a951e004573c03ea53e01a)
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)
Bluetooth: DUN: Add DUN profile support in Settings APP

It registers service listener for DUN profile with the
BT adapter, and it will track the profile status with
the service listener state chnages.

It also has support for DUN profile connection status
updation and DUN Disconnection from server.

CRs-Fixed: 557180
Change-Id: I83d4919821cb095429ff7e73a8974d92c4df086c
(cherry picked from commit 59ec7bc7e1f29edc74512b7c180dc9559202a063)
(cherry picked from commit a1df3d0f11a974c9caa199fc7be1c47cfd809cf3)
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)