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

Commit 2cf5b73c authored by Jim Miller's avatar Jim Miller Committed by android-build-merger
Browse files

Merge \"Move legacy full disk encryption code to Settings.\" into nyc-dev

am: 4401e24a

Change-Id: Ic10c6505e4583f487a41eb659227b955013949b7
parents 514c1ae4 4401e24a
Loading
Loading
Loading
Loading
+0 −17
Original line number Diff line number Diff line
@@ -915,23 +915,6 @@ public class LockPatternUtils {
        }
    }

    /**
     * Gets whether the device is encrypted.
     *
     * @return Whether the device is encrypted.
     */
    public static boolean isDeviceEncrypted() {
        IMountService mountService = IMountService.Stub.asInterface(
                ServiceManager.getService("mount"));
        try {
            return mountService.getEncryptionState() != IMountService.ENCRYPTION_STATE_NONE
                    && mountService.getPasswordType() != StorageManager.CRYPT_TYPE_DEFAULT;
        } catch (RemoteException re) {
            Log.e(TAG, "Error getting encryption state", re);
        }
        return true;
    }

    /**
     * Determine if the device supports encryption, even if it's set to default. This
     * differs from isDeviceEncrypted() in that it returns true even if the device is