mirror of
https://github.com/PixelExperience-Devices/device_xiaomi_sm6250-common.git
synced 2025-07-01 07:19:53 +09:00
sm6250-common: Adapt libinit to Android 11
[wight554: add property_override to common header] Signed-off-by: Mohammad Hasan Keramat J <ikeramat80@gmail.com> Signed-off-by: Volodymyr Zhdanov <wight554@gmail.com> Change-Id: Ia6b6f753891b639dad4e380bdba6b594faf2a550
This commit is contained in:
@ -23,7 +23,16 @@
|
||||
#include "init_common.h"
|
||||
#include "property_service.h"
|
||||
|
||||
using android::init::property_set;
|
||||
void property_override(char const prop[], char const value[], bool add)
|
||||
{
|
||||
auto pi = (prop_info *) __system_property_find(prop);
|
||||
|
||||
if (pi != nullptr) {
|
||||
__system_property_update(pi, value, strlen(value));
|
||||
} else if (add) {
|
||||
__system_property_add(prop, strlen(prop), value, strlen(value));
|
||||
}
|
||||
}
|
||||
|
||||
void load_dalvik_properties() {
|
||||
char const *heapstartsize;
|
||||
@ -56,12 +65,12 @@ void load_dalvik_properties() {
|
||||
return;
|
||||
}
|
||||
|
||||
property_set("dalvik.vm.heapstartsize", heapstartsize);
|
||||
property_set("dalvik.vm.heapgrowthlimit", heapgrowthlimit);
|
||||
property_set("dalvik.vm.heapsize", heapsize);
|
||||
property_set("dalvik.vm.heaptargetutilization", heaptargetutilization);
|
||||
property_set("dalvik.vm.heapminfree", heapminfree);
|
||||
property_set("dalvik.vm.heapmaxfree", heapmaxfree);
|
||||
property_override("dalvik.vm.heapstartsize", heapstartsize);
|
||||
property_override("dalvik.vm.heapgrowthlimit", heapgrowthlimit);
|
||||
property_override("dalvik.vm.heapsize", heapsize);
|
||||
property_override("dalvik.vm.heaptargetutilization", heaptargetutilization);
|
||||
property_override("dalvik.vm.heapminfree", heapminfree);
|
||||
property_override("dalvik.vm.heapmaxfree", heapmaxfree);
|
||||
}
|
||||
|
||||
void load_common_properties() {
|
||||
|
Reference in New Issue
Block a user