Merge "Don't include password on default encryption command" into mnc-dr-dev

This commit is contained in:
Paul Lawrence
2015-10-21 14:27:33 +00:00
committed by Android (Google) Code Review

View File

@@ -2415,8 +2415,13 @@ class MountService extends IMountService.Stub
}
try {
mCryptConnector.execute("cryptfs", "enablecrypto", "inplace", CRYPTO_TYPES[type],
new SensitiveArg(password));
if (type == StorageManager.CRYPT_TYPE_DEFAULT) {
mCryptConnector.execute("cryptfs", "enablecrypto", "inplace",
CRYPTO_TYPES[type]);
} else {
mCryptConnector.execute("cryptfs", "enablecrypto", "inplace",
CRYPTO_TYPES[type], new SensitiveArg(password));
}
} catch (NativeDaemonConnectorException e) {
// Encryption failed
return e.getCode();