Use a dual pane layout instead of the navigation drawer for sw600dp screens or larger.

PS2: mActionBar should be assigned regardless of whether mDrawerLayout is null.

PS3: Use dual-pane layout when in landscape orientaiton.

Change-Id: If2c96cda691bab50ebd5d869f910a9351973367b
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
Framework: Add the ability to enable/disable use of Profiles

This will remove the Profiles item from the Power menu when the user has
selected to disable the use of System Profiles.

TODO: Better handling of returning a default profile when requested

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

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
Profiles: Airplanmode Settings with Checkbox (1/2)

Change Airplanemode Settings to look like Connection/SilentMode etc.

Change-Id: Ic340c4eac22b1c94dd5f7a94a9608e98c76a0e98
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
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
Framework: Call Ring mode what Google calls it, not Silent mode (2 of 2)

Silent mode -> Ring mode cleanup

Change-Id: I929f7d1699b623b4a93608dd32786ebc2691b51b
Fix profile broadcast

Change-Id: I68251d16c371e3e1a4ec33f921d40d2d81df1139
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
Framework: Fix Profiles Insecure lock screen not working (take 2)

Change-Id: I16744dc6523787dbe011a9a0a8d61b0702b62344
Keyguard: remove duplicated code

Patchset 2: fixed whitespace error
Patchset 3: a few more tiny changes
Patchset 4: some code moving, removing an unnecessary member
Patchset 5: make toggleSilentMode() a bit easier to read
Patchset 6: revert most of the cleanup
Patchset 7: fix syntax error
Patchset 8: fixes pointed out by Danny Baumann

Change-Id: I4e5f8c92b223c1260891472dbf807d5ff53e5721
LockPatternUtils: isSecure: respect profile settings

When the lock screen is set to secure and overridden to insecure
by profile settings, isSecure() would return true causing confusion
to some code.

For example, attempting to use a lockscreen shortcut
to launch an activity will cause the device to soft-reboot due to
recursive calling and a stack overflow.

Change-Id: I02984671c2a047765f4da1f6a44bb19dea5bf2d3
Profile: respect DPM when overriding screen lock (1/2)

Profile currently allows the user to override the keyguard set by
device policy, which is undesired.

Change-Id: Id8d80cfdad51ca0a64dc231a77e53b104ecb9825
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
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
[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
Lockscreen : Fix widgets disabled

Currently, when keyguard widgets are disabled via the DevicePolicyManager,
a default widget if specified via widget_default_package_name/widget_default_class_name
is added on the main screen, and if not successful the default status widget is added.

However in its current state, each cycle of the lockscreen alternates between the two widgets.
Reason is, the default app widget is constantly recycled on screen power cycles, and in such events,
when checkAppWidgetConsistency() fails to add the widget (since the id is no longer valid), it toggles
back to the default status widget, and resets the stored id. Next cycle a new id is allocated and it works
and so on ...

This patchset addresses this issue by not removing the default status widget if not necessary, hence
preserving its id and fixing the toggling issue.

Change-Id: I6b21d18346fed5accc72141097939c92ee9aaa3c
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>