packages: settings: CryptKeeper: Disable FDE if PFE activated

Don't allow Full-Disk-Encryption (FDE) after Per-File-Encryption (PFE)

Change-Id: I5ed46d4362f6536a6cf526aa5bf4bac4610c47b6
Fix Settings app crash for devices with no USB support.

On emulator and any device that does not support USB connection, the
Settings app crashes as soon as the user tries to view the details of
an installed app. This is because the InstalledAppDetails activity
assumes that the USB service is always started, which is no longer
true due to a change in SystemServer.java (frameworks/base, Change-Id
I6dad511c652bcacc085f27ede5f8f22a6982c6bd). Adding null checks fixes
this issue.

Change-Id: I85263fb795ee06bd61ba28ec12a7161c1f17f4cc
Signed-off-by: Yu Ning <yu.ning@intel.com>
BT: Multi HF support in Settings App.

1. The connected sinks are not disconnected from
HeadsetProfile when new sink is connecting.
2. Also return correct connection status for
specific HS.
3. Sets priority for specific HS while disconnecting.

Change-Id: I876f9810be82482cb360451343e4eb2a9f3ed668
Settings: Show Service State status in Phone Status properly

When the network mode is data only mode, the voice service state
would be OOS. In such cases, data service state is not checked to
show the phone status UI. Fix to consider data service state also to
update the UI properly.

Change-Id: I20fb6ea3256d0fe4a534fbb781e664d7ce774a05
CRs-Fixed: 517234
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
Conflicts:
	AndroidManifest.xml

Bluetooth: Set Scan Mode to Connectable after user switch

Set the scan mode to connectable after user is switched if
end discoverable time is zero. Otherwise, if BT turned ON
after switch BT will be discoverable and timeout will be improper
if previous user set timeout to never timeout.

CRs-Fixed: 691014
Change-Id: I9765f314faa41d6cba1367a493ddf7b64b0d27eb
Conflicts:
	src/com/android/settings/bluetooth/BluetoothEnabler.java

Bluetooth: Not allow Blank BT device name.

Add empty string check for BT device name
and not enable ok button until entered
device name is not empty.

CRs-fixed: 471158
Change-Id: Ib7c460bee5c8d86d13acd66d228279dd1a240c25
Add support for below network modes info in hidden menu

 LTE/WCDMA
 TD-SCDMA only
 TD-SCDMA and WCDMA
 TD-SCDMA and LTE
 TD-SCDMA and GSM
 TD-SCDMA,GSM and LTE
 TD-SCDMA, GSM/WCDMA
 TD-SCDMA, WCDMA and LTE
 TD-SCDMA, GSM/WCDMA and LTE
 TD-SCDMA, GSM/WCDMA, CDMA and EvDo
 TD-SCDMA, LTE, CDMA, EvDo GSM/WCDMA

Add support for other network modes in set preferred
network mode UI option in phone information in hidden menu

Change-Id: Id3fd9a27be84e85f4f32a0fd2a7eee9eec545227
CRs-Fixed: 569944
Bluetooth: Check device address.

If connect is initiated for same device,
Ignore it instead of disconnecting and
reconnecting it.

Change-Id: Ie167bf3a28581ac8687d892204edacf1da257e6c
CRs-Fixed: 664310
CRs-Fixed: 667989
Bluetooth: DUN: Add DUN profile support in Settings APP

This patch 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.

Change-Id: I6bd0069b3619b3487433c2e05f1e27ce9375a7e7
CRs-Fixed: 557180
Bluetooth: Fix resource leak in OPP (2/3).

This patch handles onPause in DevicePickerFragment class, which
would be called when user presses back button and does not select
any device. This will send intent to class that called
DevicePickerFragment that no device is selected.

Change-Id: Ib3965d7dea8d59b244abdc6ffe61ef21109346fb
CRs-Fixed: 662147
Bluetooth: Handle pairing Cancel intent.

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

CRs-fixed: 463362

Change-Id: I63c9299edca4356485f26cbc6332e3be9bdfbf17
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
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
Increase allowed duration to connect to HOGP 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: Ia8a33a6ef8951d6e08b4a22837fcfdb70910112c
Telephony: Disable PIN Toggle option if SIM is in Locked state.

When user presses cancel in PIN lock screen, card will be in
LOCKED state and hence cannot access SIM for any transactions.

So Disable PIN Toggle option in Locked State.

Change-Id: Id569c9976c6fb9a3b2490577c80348cf2f2489ab
CRs-Fixed: 576782
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
wlan: Provide runtime option to enable or disable rssi threshold (settings)

RSSI threshold check in AutoJoin feature will not allow
to connect if AP's RSSI is low, this option will allow user
to enable/disable RSSI threshold check through advance settings.

Conflicts:
        res/xml/wifi_advanced_settings.xml
        src/com/android/settings/wifi/AdvancedWifiSettings.java

Change-Id: I82d7082a97cfc2dc75e0b14221b176697060e05d
CRs-Fixed: 710284
Bluetooth: Add A2DP Sink interface in Settings app

- add interface for A2DP Sink in settings app

Change-Id: If26f9ddd6a91085ec0e485dfa5f03a8ee600fdef
Telephony: Use new apn.sim.operator_numeric property.

Use new property to filter apns. We need this new property
because icc.operator_numeric property is also used in cdma
and ApnSetting UI might display wrong set of apns if the
peroperty value used was set by RuimRecords.
CRs-Fixed: 362846

Conflicts:
        src/com/android/settings/ApnSettings.java

Change-Id: Ie740c9b3bb6a14621e19c55e4fa18c66bc0d7b0c
Settings:PIN/PUK Lock and Status

- Added support for RUIM PIN locking
- Display message to indicate PIN/PUK status changes
Changes done to display retry counter on wrong entry of PIN1,
and message to indicate PIN1 enable/disable as per certain
carrier requirements.
- Process NOT_SUPPORTED response for pin lock checkbox
If RIL replies with REQUEST_NOT_SUPPORTED
when trying to enable or disable pin lock
process such response and display appropriate message.
-For some cards, ICC LOCK should be enabled
to change the password. In this case RIL_E_REQUEST_NOT_SUPPORTED
should be sent by RIL. On receiving this message
the Settings app should display Enable ICC LOCK message.
-Don't assume that the exception returned on a PIN operation
is a CommandException. Handle other types as well, like
RuntimeException
-Display appropriate toast error message based on the SIM PIN
lock operation.
-Break all lines > 80 chars.

CRs-Fixed: 222544, 181380, 181401, 229819, 246807, 249863, 337001, 441001, 611221

Change-Id: I142137e44cc11a8a5d42b0e458d5654422c4c630
Packages: Fix for SAP turn ON/OFF fails issue.

Turnig ON/OFF SAP repeatedly when WIFI is ON results
in to 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.

CRs-Fixed: 525872

Conflicts:
src/com/android/settings/wifi/WifiApEnabler.java
Change-Id: I1a37ac6406ea5e342d6dcb80654c2728fa447e57