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

Commit 8abf3df3 authored by Linux Build Service Account's avatar Linux Build Service Account Committed by Gerrit - the friendly Code Review server
Browse files

Merge "security: prevent FDE after PFE"

parents ce816d9b 1213e2f4
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -3387,6 +3387,11 @@ public class DevicePolicyManagerService extends IDevicePolicyManager.Stub {
     * {@link DevicePolicyManager#ENCRYPTION_STATUS_ACTIVE}.
     */
    private int getEncryptionStatus() {
        String pfeStatus = SystemProperties.get("vold.pfe", "");
        if ("activated".equalsIgnoreCase(pfeStatus)) {
            return DevicePolicyManager.ENCRYPTION_STATUS_UNSUPPORTED;
        }

        String status = SystemProperties.get("ro.crypto.state", "unsupported");
        if ("encrypted".equalsIgnoreCase(status)) {
            final long token = Binder.clearCallingIdentity();