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

Commit 5c21c703 authored by Paul Lawrence's avatar Paul Lawrence
Browse files

Add APIs to allow detection of encryption type

Change-Id: Ic80086386afcf7b674cac676443690151c80e181
parent 1fffffcf
Loading
Loading
Loading
Loading
+9 −0
Original line number Diff line number Diff line
@@ -882,6 +882,15 @@ public class LockPatternUtils {
        return "encrypted".equalsIgnoreCase(status);
    }

    /**
     * Determine if the device is file encrypted
     * @return true if device is file encrypted
     */
    public static boolean isFileEncryptionEnabled() {
        final String status = SystemProperties.get("ro.crypto.type", "");
        return "file".equalsIgnoreCase(status);
    }

    /**
     * Clears the encryption password.
     */