Check "Secure start-up" before toggling emulation.

To fully emulate FBE we need to avoid the Cryptkeeper bounce, so
check to make sure user has disabled "Secure start-up" so vold can
unlock early during boot.

Bug: 27595501
Change-Id: Ic0d03f94982534381671e1039f14d1fd06bc0e4e
This commit is contained in:
Jeff Sharkey
2016-03-21 13:02:06 -06:00
parent f0ec2e0050
commit 5a78516897

View File

@@ -1946,6 +1946,10 @@ class MountService extends IMountService.Stub
throw new IllegalStateException(
"Emulation not available on device with native FBE");
}
if (mLockPatternUtils.isCredentialRequiredToDecrypt(false)) {
throw new IllegalStateException(
"Emulation requires disabling 'Secure start-up' in Settings > Security");
}
final long token = Binder.clearCallingIdentity();
try {