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

Change-Id: I16744dc6523787dbe011a9a0a8d61b0702b62344
Keyguard: remove duplicated code - CM

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

Conflicts:
	policy/src/com/android/internal/policy/impl/keyguard/KeyguardHostView.java
Framework: Forward port the ability to enable/disable keyguard with Profiles - CM

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

Change-Id: I557b80e6de62687b05c434a31083c331127a0398

Conflicts:
	policy/src/com/android/internal/policy/impl/keyguard/KeyguardViewMediator.java
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