Protected App [2/3] Protected Apps Settings -> Apps: - Added Receiver which can send in a call to PackageManager to toggle a components protected status. - Add Protected Apps activity (available from Apps fragment) - Reads from ApplicationInfo state - Requires Pattern Lock to view/modify protected apps - Updates Settings Secure DB with protected components - Support resetting protected apps pattern lock

Change-Id: If07a7b69ac963ffae855621881e1944fc8754782
Signed-off-by: Chet Kener <Cl3Kener@gmail.com>
Settings :Add lockscreen icon.

Change-Id: I95500f427066f9d9683bdcf5478f6f86aebb762c
Signed-off-by: Chet Kener <Cl3Kener@gmail.com>
Protected Apps:

 - App Info for protected Apps doesn't allow Uninstall or Clear data
 - App Info menu item for launching into Protected Apps when looking at protected components
 - Prevent process dialog from getting dismissed on touch or back key (can cause odd behavior if cancelled mid-protect)

Signed-off-by: Chet Kener <Cl3Kener@gmail.com>

Conflicts:
	src/com/android/settings/applications/InstalledAppDetails.java

Change-Id: I64104d7ff3fbf9d8c393ebf262d4de0b28abbc5c
Signed-off-by: Chet Kener <Cl3Kener@gmail.com>
Reset Pattern: - If user cancels while creating new pattern, old pattern is restored

Change-Id: I55955b1ffadca2ba712c40c7d443c4fc4b0f528c
Signed-off-by: Chet Kener <Cl3Kener@gmail.com>
Clean up protected apps code (1/2)

- Work with actual ComponentNames instead of converting them between
  String and ComponentName all the time
- Name protection state parameter in methods 'state' instead of
  'protect', as a value of true actually means it's not protected. Also
  consistently use the respective constants for its values.
- Some misc. cleanup

Change-Id: I2855978c8aef3cfa14249e3398039c7cdd145ede
Signed-off-by: Chet Kener <Cl3Kener@gmail.com>
Settings: Create a security fallback on protected apps.

  -- Allow a user to bypass pattern lock on protected apps
  by inputting their primary account information for the
  device.

Change-Id: I39e5a89a8699cfd2ffaba8aea2daa4f477f2cc9b
Signed-off-by: Chet Kener <Cl3Kener@gmail.com>
settings: reset protected apps view instead of finish the activity

Finish the app after resettings the account, will lead to the protected app selection without a
valid pattern. Instead this should reset the pattern view to create a new pattern prior to go to
protected apps.

Change-Id: Ida41a29f4f8787940f803a23014a68a2f8beb969
Signed-off-by: Jorge Ruesga <jorge@ruesga.com>
Signed-off-by: Chet Kener <Cl3Kener@gmail.com>
Settings: Don't show protected apps options in restricted profiles.

Change-Id: I38c2e8fd3508d360f0e23703ce6c939f02f3714e
JIRA: 4668
Issue: https://jira.cyanogenmod.org/browse/CYAN-4668
Signed-off-by: Chet Kener <Cl3Kener@gmail.com>
Follow normal lock screen convention - allow user to retry when creating pattern lock

Change-Id: I6ad39b07b8de3de03146322b37b60e3f846093d1
Signed-off-by: Chet Kener <Cl3Kener@gmail.com>
Fix: Even when the list is entirely unchecked there may still be components which are still protected and need to cleared when Reset is triggered.

https://jira.cyanogenmod.org/browse/BACON-679
https://jira.cyanogenmod.org/browse/CYAN-4835

Change-Id: Ifee3e8b87be39769aedfed0f9a5bda366c67ee45
Signed-off-by: Chet Kener <Cl3Kener@gmail.com>
ProtectedApps pattern lock for landscape mode.

Change-Id: I9ef70a0e363d4d17510188d24f4742f458fba38e
Signed-off-by: Chet Kener <Cl3Kener@gmail.com>
Launch Protected Apps

Change-Id: I2dc2e1e05c1979118d5324c3c05adfcc6f7ee22a
Signed-off-by: Chet Kener <Cl3Kener@gmail.com>