Bring profiles from CM
This commit includes:
 - Profiles

Change-Id: Ibd63116df90b06f6ce6adb8a0343059bbb999bfb

Conflicts:
	core/java/android/app/ContextImpl.java
	core/res/res/values/public.xml
	core/res/res/values/strings.xml
Fix profile broadcast

Change-Id: I68251d16c371e3e1a4ec33f921d40d2d81df1139
[1/2] Add triggers to change profile based on AP

Add data structure mWifiTriggers to store triggers per profile.
Add network change listener to switch to profile

Change-Id: I97e360d7783d3b0e2bbd70fe7a9a866d8c0fa7cd

Conflicts:
	core/java/android/app/Profile.java
[2/2] Add bluetooth triggers to profiles

Change-Id: I374cc93364c88b8b29c88345deccf297234ff624
Profile: Filter on NETWORK_STATE_CHANGED instead of SUPPLICANT_STATE_CHANGED

For more reliable network change detection use NETWORK_STATE_CHANGED
instead of SUPPLICANT_STATE_CHANGED

Only set profile when profile actually changed.
Use getWifiSsid instead of getSSID so we dont have to strip double
quotes ourselves, add null pointer exception check because function can
now be called when WiFi is off.

Change-Id: I2b4ea65fdb484edb39a14725c648d9ab0d5d36fb
Also backup profiles file via backup manager.

Change-Id: Id70cb1bce15b7de127e4291e9482ab3fd7270f9f
Add 2G/3G option to profile connections (1/2)

Change-Id: I55d0768c9eeecb7dcce97c6d6390e339d678d0c4

Conflicts:
	core/java/android/app/ConnectionSettings.java
Profiles: Fix turning bluetooth on/off when its in intermediate state

Change-Id: I09213c987580f47a6c3618edb469edabda96230c
Profiles : Allow nfc override (1/2)

Part 2 : http://review.cyanogenmod.org/#/c/37013/

Allow user to override nfc state via profiles
Request jira : https://jira.cyanogenmod.org/browse/CYAN-989

Change-Id: Ief7fa4ab83527f488fbd8c0bc96448a2a2cde6fb

Conflicts:
	core/java/android/app/ConnectionSettings.java
FW: Ability to hide Profiles toggle in Power Menu (1/2)

Some users would prefer hiding the profiles toggle in the power menu even if the feature is enabled.

Conflicts:
	policy/src/com/android/internal/policy/impl/GlobalActions.java
migrate vibrator to silent mode settings (1/2)

Change profiles:
* remove deprecated vibrator settings
* add silent mode settings

Available modes:
* off
* vibrate
* silent

Patch Set 1:
Initial patch with plain ListPreference

Patch Set 2:
Use Checkbox + Dialog like ConnectionSettings

Patch Set 3:
Fix code style

Change-Id: Ic5ec3486070866b7358f843a0843ccd0753e8c72

Conflicts:
	core/java/android/app/Profile.java
Profiles: Airplanmode Settings with Checkbox (1/2)

Change Airplanemode Settings to look like Connection/SilentMode etc.

Change-Id: Ic340c4eac22b1c94dd5f7a94a9608e98c76a0e98
Signed-off-by: kecinzer <kecinzer@gmail.com>

Conflicts:
	core/java/android/app/Profile.java
Fix airplane mode

Change-Id: I9259e6e90c7f67cf5fc31a8a3626917e41214379