Settings: add back SMS security limit

Limit the number of outgoing messages per every 15 minutes by
any application that sends text messages.

PS2-4: Whitespace fixes

Change-Id: Ibb61396ea9adb3f95cdbd13b91cbbc3477f6e361
(cherry picked from commit 4abe7d444c8e18deafb6e3d9f4b3d8fd56d22532)

Conflicts:
	res/values/cm_arrays.xml
	res/values/cm_strings.xml
Update the SMS sending limit instantly (2/2)

This commit also shortens and simplifies the preference summary text
considerably.

Patch set 2  : Slight rewording
Patch set 3  : Another minor wording change

Conflicts:
	res/values/strings.xml

Change-Id: I75394ee92fa5d85c84fa0bc32f5037afe6a8a3cd
(cherry picked from commit f3617aca2e765304dc54d9c8a8a796627c3efc4d)
New NL translation V8/V9

Updated for V8/V9
(cherry picked from commit 42824ba257b21599a90fbeac3ad0b7907b3275f1)
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)
(cherry picked from commit c819b5639d551730ee6c5067d86dd4931f4eca37)
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)
(cherry picked from commit 8907bc1181a9139fab5b18d9874c0bb1e944f271)
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)
(cherry picked from commit bb77f6b734db128923559e0055d1d539e2cc6058)
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)
(cherry picked from commit 3ea385b3f197c943ff493cde62df27e707bf9ecd)
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)
(cherry picked from commit 0020e4df762f7cf6362135519ff589f5be19670e)
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)
(cherry picked from commit 0d1bc650e6663f9bb46bcca9548e197a86bd40c8)
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)
(cherry picked from commit 39aad77c307f7fcb4414e47ac238e634dc07abbb)
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)
(cherry picked from commit ed98c16ad509a22aad7b5c27057623ee081e3b97)
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)
(cherry picked from commit 5ee9b070b18227c1fd98dbc900303d3d52954b3b)
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)
(cherry picked from commit a07039f44295fed18af739c3bb73d710a49be677)
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
(cherry picked from commit d7bd10ad2f16430c9ac33a68099a4eb586f0a356)
WifiSettings: Handle DISABLED_ASSOCIATION_REJECT.

Upon receiving multiple association rejects for a network,
framework disables corresponding network providing reason
code as DISABLE_ASSOCIATION_REJECT. this is handled
in order to provide appropriate user experience.

CRs-fixed: 484247
Change-Id: I3d344068a58d2dfd82c9bc8b23f43fdf980cc4d9
(cherry picked from commit 72d6dc6ef0f4229b0167a28a4621121b7840c403)
Packages: Fix for SAP turn ON/OFF fails issue.

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

Change-Id: I1a37ac6406ea5e342d6dcb80654c2728fa447e57
CRs-Fixed: 525872
(cherry picked from commit 3aa35dbd6a1f7e247d9e1c57a32b389f4f55d6dd)
Merge branch 'cm-11.0' of git://github.com/CyanogenMod/android_packages_apps_Settings into cm-11.0

Conflicts:
	res/values/cm_arrays.xml
	res/values/cm_strings.xml

(cherry picked from commit 205252656a577ca32a9c22b4dbd959527ed06150)
[1/2] packages/apps/Settings: enable quickunlock

Automatically unlock the lockscreen when correct PIN/Password is keyed

Base: https://gerrit.omnirom.org/#/c/2606

Change-Id: I4d37a1651689f88a878b58530c77fa562eca42db

Patchset: 4
https://gerrit.omnirom.org/#/c/2605/
(cherry picked from commit fd580b12da3b5b296c94fa5582b50f1ea4dd892a)

Conflicts:
	res/values/cr_strings.xml