Settings: Fix no preferred APN

Add preferred APN if found no match.

CRs-Fixed: 748830

Change-Id: Ibecf88a3e6236de13a0a4291438a6e62159a05e0
Setting: add app move to external storage

Add support tp move APP to external storage.

Change-Id: I9d8fef2df2f36b4d8b611d8ffe87990407b44742
Bluetooth: GAP: Handled scan mode during first time BT On

As the discoverability time out concept changed as per the
new design and this code snippet "setting scan mode to
connectable only when endtimestamp is null" is not
applicable.DUT remains in only connectable mode
if user remains in the settings menu.

Change-Id: I7aa2ea7d23c4a47f716e2c0645b2ad73018ada39
CRs-fixed: 714578
Bluetooth: Don't Initiate Connection if UUID not updated

 - if UUIDs are not updated don't initiate profile connection
 - add new profiles to already existing list
 -  don't delete profiles from the existing list

CRs-Fixed: 717840

Change-Id: Id71a5aad59f4004c262f3ad17f34fa0574654170
Bluetooth: Enable Page and Inquiry Scan.

When Bluetooth Setting is in foreground enable both
Page Scan and Inquiry Scan.
Changes made to make device both in connectable and
discoverable if user is in Bluetooth setting menu.
CRs-Fixed: 753990

Change-Id: I2d72ce3192f6b7fa9eb6beb5a175a3e732dac5a8
Bluetooth: GAP: Reset Alias name during virtual unplug

As per this fix Alias name get resetted when hid virtual
unplug initiated from HID device.

Change-Id: Idb1cba447072fd70c21cfecef8776b2baaf730bc
CRs-Fixed: 754689
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: GAP: Handled Null pointer deference in unregisterReceiver

Handled Null pointer deference in unregisterReceiver event of
pairing dialog

Change-Id: Ie0d0561cb3c0f09a018e1aeb20579700c6e8d783
CRs-fixed: 761872
Bluetooth: Add Manifest configure to fix settings crash issue.

Settings is crashed when press back key after rotating screen when
Bluetooth profile activity is opened. Add manifest configure to
enable screen orientation feature.

Change-Id: I4550b18383d817d1a2f46fbeebda8a3bdab580c6
CRs-Fixed: 762437
Settings App: Fix to resolve NULL pointer exceptions

This fix resolves any NULL pointer exceptions and
Array Index Out of Bounds exceptions seen in
Settings Application code space.

CRs-Fixed: 760115
Change-Id: I8c2b7b8e19d362a5c5789d8693bcd3656c32e38d
Remove the System updates setting

Change-Id: Iacf68e7d909e876a009d2dd46df453bdecf6e563

Conflicts:
	res/xml/device_info_settings.xml
Telephony(MSIM): Register for subInfo record intent

Register for ACTION_SUBINFO_RECORD_UPDATED intent,
this is to update the SIM details on UI when card
hot-swap removed.

Change-Id: I18d908c9845afb81478a81530407021c8e7f5fbe
CRs-Fixed: 742968
Fix issue that there is no indication to tell user the data sub changed
when disable one SIM slot.

Add a toast to indicate user that data sub was changed when disable one
SIM slot.

Change-Id: I18f818ee77f3bb24709146389facd128a86dfd6e
CRs-Fixed: 656074
Modify code to get data_state from phoneStateListener.

Modify code to get data state from phoneStateListener
instead of TelephonyManager.

Change-Id: I965acf29c24d724676beaacd318e3ccfc1542ed8
CRs-Fixed: 755443
Telephony(MSIM): Disable PIN1 option when SUB is not READY.

When Subscription in not in Ready state, it is not possible to
interact with uicc app for enabling/disabling the PIN1.

So disable the PIN1 options when sub is not in READY state

Change-Id: I0b17fce2d22f9d77618e5303a4b89e83d34cbb63
CRs-Fixed: 662114
Remove QuickBoot preference if package isn't available

Change-Id: I6f00b6be8d87c1013d2c695d93e66d276017b0a1
Settings: Add Advanced reboot (1 of 2)

This commit adds a setting in Development settings for including options
in the power menu for rebooting into recovery or bootloader, defauled to
off.

When enabled, the Advanced reboot options will only be available once the
device is unlocked.

Modified from this CM commit= 28ad8e332631198a987d55eed13440a5332ec19a
To work with AOSP

Change-Id: I17ccc3d9722c88f5500cd9c8c1873fd7cef631a2
Launch SuperSU from Settings

If SuperSU is installed, show an entry in Settings below
"Developer options", which launches SuperSU when tapped.
At boot time SuperSU will detect if com.android.settings
contains the resources from this patch, and if so it
will hide itself from the launcher. This was implemented
in v1.85, so we only show the entry if the installed
SuperSU version is at least that.

PS3 - Added material green icons for SU

Change-Id: I2af95a1a4396101ff87448cd0ae20addf235af52

Conflicts:
	res/values/strings.xml

Change-Id: Id68b09c0113ac5f71d47223ce28d04d5f5d72bd6
Merge https://github.com/AndroidOpenDevelopment/android_packages_apps_Settings into HEAD