INFO("Close all applications using external storage...");
killDependedApplications();
INFO("Encryption started...");
- ::vconf_set_str(EXTERNAL_STATE_VCONF_KEY, "error_partially_encrypted");
engine->encrypt(MasterKey, options);
setOptions(options & getSupportedOptions());
INFO("Sync disk...");
sync();
INFO("Encryption completed");
::vconf_set_str(EXTERNAL_STATE_VCONF_KEY, "encrypted");
+ context.notify("ExternalEncryption::mount");
} catch (runtime::Exception &e) {
+ ::vconf_set_str(EXTERNAL_STATE_VCONF_KEY, "error_partially_encrypted");
ERROR("Encryption failed - " + std::string(e.what()));
}
};
INFO("Encryption completed");
::vconf_set_str(INTERNAL_STATE_VCONF_KEY, "encrypted");
+ context.notify("InternalEncryption::mount");
::reboot(RB_AUTOBOOT);
} catch (runtime::Exception &e) {
::vconf_set_str(INTERNAL_STATE_VCONF_KEY, "error_partially_encrypted");