if (QueryIsPreloadPackage(context_->pkgid.get(), context_->uid.get()))
SetExtAttrForPreloadPackage(
QueryIsUpdatedPackage(context_->pkgid.get(), context_->uid.get()),
- QueryIsRemovablePackage(context_->pkgid.get(), context_->uid.get()));
+ QueryIsRemovablePackage(context_->pkgid.get(), context_->uid.get()),
+ QueryIsSystemPackage(context_->pkgid.get(), context_->uid.get()));
UnregisterApplication();
if (!RegisterApplication()) {
LOG(ERROR) << "Unsuccessful app registration";
LOG(ERROR) << "Some parameters are lacking";
return Status::ERROR;
}
- SetExtAttrForPreloadPackage(false, false);
+ SetExtAttrForPreloadPackage(false, false, true);
UnregisterApplication();
if (!RegisterApplication()) {
LOG(ERROR) << "Unsuccessful app registration";
}
void StepRecoverApplication::SetExtAttrForPreloadPackage(
- bool is_updated, bool is_removable) {
+ bool is_updated, bool is_removable, bool is_system) {
manifest_x* manifest_data = context_->manifest_data.get();
free(manifest_data->preload);
manifest_data->preload = strdup("true");
free(manifest_data->update);
manifest_data->update = strdup(is_updated ? "true" : "false");
free(manifest_data->system);
- manifest_data->system = strdup(is_removable ? "false" : "true");
+ manifest_data->system = strdup(is_system ? "true" : "false");
free(manifest_data->readonly);
manifest_data->readonly = strdup(is_removable ? "false" : "true");
free(manifest_data->removable);