[FRP] Theme interstitials for lock screen setup

Use the setup wizard theme for EncryptionInterstital and
RedactionInterstitial as they will show during the lock screen setup
as part of setup wizard.

Bug: 18482708
Change-Id: I65c8924952345a4e17fcf4ffb7d68df53244c5d7
This commit is contained in:
Maurice Lam
2014-12-01 10:41:49 -08:00
parent 6b19fa9017
commit ecd2b7b81f
12 changed files with 280 additions and 9 deletions

View File

@@ -189,13 +189,13 @@ public class ChooseLockGeneric extends SettingsActivity {
if (Process.myUserHandle().isOwner() && LockPatternUtils.isDeviceEncryptionEnabled()) {
mEncryptionRequestQuality = quality;
mEncryptionRequestDisabled = disabled;
final Context context = getActivity();
// If accessibility is enabled and the user hasn't seen this dialog before, set the
// default state to agree with that which is compatible with accessibility
// (password not required).
final boolean accEn = AccessibilityManager.getInstance(getActivity()).isEnabled();
final boolean accEn = AccessibilityManager.getInstance(context).isEnabled();
final boolean required = mLockPatternUtils.isCredentialRequiredToDecrypt(!accEn);
Intent intent = EncryptionInterstitial.createStartIntent(
getActivity(), quality, required);
Intent intent = getEncryptionInterstitialIntent(context, quality, required);
startActivityForResult(intent, ENABLE_ENCRYPTION_REQUEST);
} else {
mRequirePassword = false; // device encryption not enabled or not device owner.
@@ -414,6 +414,11 @@ public class ChooseLockGeneric extends SettingsActivity {
confirmCredentials);
}
protected Intent getEncryptionInterstitialIntent(Context context, int quality,
boolean required) {
return EncryptionInterstitial.createStartIntent(context, quality, required);
}
/**
* Invokes an activity to change the user's pattern, password or PIN based on given quality
* and minimum quality specified by DevicePolicyManager. If quality is