diff options
author | Paul Lawrence <paullawrence@google.com> | 2015-10-21 14:27:33 +0000 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2015-10-21 14:27:33 +0000 |
commit | 68521fd7ce5e87a4e752569b5691b75d441e8a48 (patch) | |
tree | 6918c21717bd26410d785fee5eb52ca6895dffe0 /services | |
parent | fde4111eea4b92fbc10c9d6da7eaaa349292d9ec (diff) | |
parent | 5096d9e13e2cdfe9f9e78ebc4e551327bfb2c171 (diff) | |
download | frameworks_base-68521fd7ce5e87a4e752569b5691b75d441e8a48.zip frameworks_base-68521fd7ce5e87a4e752569b5691b75d441e8a48.tar.gz frameworks_base-68521fd7ce5e87a4e752569b5691b75d441e8a48.tar.bz2 |
Merge "Don't include password on default encryption command" into mnc-dr-dev
Diffstat (limited to 'services')
-rw-r--r-- | services/core/java/com/android/server/MountService.java | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/services/core/java/com/android/server/MountService.java b/services/core/java/com/android/server/MountService.java index 4e721da..5e67414 100644 --- a/services/core/java/com/android/server/MountService.java +++ b/services/core/java/com/android/server/MountService.java @@ -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(); |