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

Commit 68521fd7 authored by Paul Lawrence's avatar Paul Lawrence Committed by Android (Google) Code Review
Browse files

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

parents fde4111e 5096d9e1
Loading
Loading
Loading
Loading
+7 −2
Original line number Diff line number Diff line
@@ -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();