Merge "Don\'t include password on default encryption command" into mnc-dr-dev am: 68521fd7ce am: 29c5fb2646 am: eab4352d9b
am: 74a3281e9c
* commit '74a3281e9c7ec37ffcc826ee7ac8cdd4b57dfab8':
Don't include password on default encryption command
This commit is contained in:
@@ -2442,8 +2442,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();
|
||||
|
||||
Reference in New Issue
Block a user