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

Commit 4e84d3bc authored by Ken Sumrall's avatar Ken Sumrall
Browse files

Set a read-only property to indicate if the device is running encrypted.

The UI needs to know if the device is running with an encrypted
filesystem or now.  So set a read-only property at boot to let it know.

Change-Id: I753de2d606c975bcbe9946d10fd47558cf357dac
parent 63990cf5
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -388,6 +388,7 @@ int do_mount(int nargs, char **args)
                /* Set the property that triggers the framework to do a minimal
                 * startup and ask the user for a password
                 */
                property_set("ro.crypto.state", "encrypted");
                property_set("vold.decrypt", "1");
            } else {
                return -1;
@@ -395,6 +396,7 @@ int do_mount(int nargs, char **args)
        } else {
            if (!strcmp(target, DATA_MNT_POINT)) {
                /* We succeeded in mounting /data, so it's not encrypted */
                property_set("ro.crypto.state", "unencrypted");
                action_for_each_trigger("nonencrypted", action_add_queue_tail);
            }
        }