Framework: Port CM9 features to CM10
This commit includes:
 - Profiles

Change-Id: Ibd63116df90b06f6ce6adb8a0343059bbb999bfb
Signed-off-by: iceandfire <arhamjamal@gmail.com>

Conflicts:
	Android.mk
	core/java/android/app/ContextImpl.java
	core/res/res/values/strings.xml
	core/res/res/values/symbols.xml
	policy/src/com/android/internal/policy/impl/GlobalActions.java

Conflicts:
	core/java/android/app/ContextImpl.java
	core/res/res/values/strings.xml
	core/res/res/values/symbols.xml
	policy/src/com/android/internal/policy/impl/GlobalActions.java

Conflicts:
	core/java/android/app/ContextImpl.java
	core/java/android/provider/Settings.java
	core/res/res/values/strings.xml
	core/res/res/values/symbols.xml
	policy/src/com/android/internal/policy/impl/GlobalActions.java

Conflicts:
	core/java/android/provider/Settings.java
	policy/src/com/android/internal/policy/impl/GlobalActions.java
Profiles: Airplanmode Settings with Checkbox (1/2)

Change Airplanemode Settings to look like Connection/SilentMode etc.

Change-Id: Ic340c4eac22b1c94dd5f7a94a9608e98c76a0e98

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

Change-Id: I9259e6e90c7f67cf5fc31a8a3626917e41214379
Framework: Forward port the ability to enable/disable keyguard with Profiles

This commit adds a few missing pieces needed to support the bypassing of the
keyguard via a profile

Change-Id: I557b80e6de62687b05c434a31083c331127a0398
Signed-off-by: iceandfire <arhamjamal@gmail.com>

Conflicts:
	policy/src/com/android/internal/policy/impl/keyguard/KeyguardViewMediator.java
Framework: Forward port Fix Profiles Insecure lock screen not working

This fixes Issue 6226: The insecure lockscreen setting is not being activated with
the use of profiles if the default is secure (PIN or Password)

Change-Id: Iaba6d39df0000da073c3ea0c35de1c78f63ad08d

Conflicts:
	policy/src/com/android/internal/policy/impl/keyguard/KeyguardHostView.java
Fix profile broadcast

Change-Id: I68251d16c371e3e1a4ec33f921d40d2d81df1139
Framework: Fix Profiles Insecure lock screen not working (take 2)

Change-Id: I16744dc6523787dbe011a9a0a8d61b0702b62344
Profiles: add PROFILES_STATE_CHANGED_ACTION broadcast intent

Added a new broadcast intent to profiles manager (PROFILES_STATE_CHANGED_ACTION), for
notify an event when profiles are enabled or disabled.

Change-Id: If701b3be54157c23acdf74e1da658fbce335437e
Signed-off-by: Jorge Ruesga <jorge@ruesga.com>

Conflicts:
	core/java/android/app/ProfileManager.java
Profile Tile: fix reboot when activating Profile Tile
We need to create GlobalActions dialog and its handlers
prior to opening Profile select dialog. Otherwise NPE caused by
uninitialized handlers occurs causing soft-reboot.

Change-Id: Ib3b7d4098630e8fa73e975d8a3a7aa2c62474d28
Signed-off-by: iceandfire <arhamjamal@gmail.com>

Conflicts:
	policy/src/com/android/internal/policy/impl/GlobalActions.java

Conflicts:
	policy/src/com/android/internal/policy/impl/GlobalActions.java
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
[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
Don't assume any ringtone is present on external storage.

If that assumption doesn't hold true, the user will lose his ringtone
and won't know why.

Change-Id: I89409e1351792d020c5458f5104f4bb9f2a040f2
[2/2] Add bluetooth triggers to profiles

Change-Id: I374cc93364c88b8b29c88345deccf297234ff624

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

Change-Id: I09213c987580f47a6c3618edb469edabda96230c
Fix profile related derps
Signed-off-by: iceandfire <arhamjamal@gmail.com>

Conflicts:
	core/java/android/app/ContextImpl.java
	core/res/res/values/cm_strings.xml
	policy/src/com/android/internal/policy/impl/GlobalActions.java

Conflicts:
	core/java/android/provider/Settings.java
	policy/src/com/android/internal/policy/impl/GlobalActions.java
clean up Profiles

Conflicts:
	policy/src/com/android/internal/policy/impl/GlobalActions.java
	services/java/com/android/server/am/ActivityStack.java

Conflicts:
	policy/src/com/android/internal/policy/impl/GlobalActions.java
Profiles: Airplanmode Settings with Checkbox (1/2)

Change Airplanemode Settings to look like Connection/SilentMode etc.

Change-Id: Ic340c4eac22b1c94dd5f7a94a9608e98c76a0e98

Conflicts:
	core/java/android/app/Profile.java

Conflicts:
	core/java/android/app/Profile.java
Profile : fix compile