Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 5096d9e1 authored by Paul Lawrence's avatar Paul Lawrence
Browse files

Don't include password on default encryption command

Bug: 22989588
Change-Id: I6f5b84519cb357af8461257654e382980b874486
parent f57d9856
Loading
Loading
Loading
Loading
+7 −2
Original line number Diff line number Diff line
@@ -2409,8 +2409,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();