msm8953-common: Set carrier prop using libinit

This commit is contained in:
Erfan Abdi
2020-06-27 21:59:44 +04:30
committed by jeangraff30
parent 5025e448d2
commit ded46b8613

View File

@@ -51,6 +51,17 @@ char const *heapminfree;
char const *heapmaxfree;
char const *heaptargetutilization;
void property_override(char const prop[], char const value[], bool add = true)
{
prop_info *pi;
pi = (prop_info*) __system_property_find(prop);
if (pi)
__system_property_update(pi, value, strlen(value));
else if (add)
__system_property_add(prop, strlen(prop), value, strlen(value));
}
void check_device()
{
struct sysinfo sys;
@@ -94,4 +105,8 @@ void vendor_load_properties()
property_set("dalvik.vm.heaptargetutilization", heaptargetutilization);
property_set("dalvik.vm.heapminfree", heapminfree);
property_set("dalvik.vm.heapmaxfree", heapmaxfree);
// Setting carrier prop
std::string carrier = GetProperty("ro.boot.carrier", "unknown");
property_override("ro.carrier", carrier.c_str());
}