mirror of
https://github.com/Evolution-X-Devices/device_xiaomi_rosemary
synced 2026-01-27 18:07:31 +00:00
rosemary: Adapt libinit to Android 11
This commit is contained in:
committed by
Matsvei Niaverau
parent
4bd9ec8009
commit
37a1f01aeb
@@ -23,5 +23,8 @@ cc_library_static {
|
|||||||
include_dirs: [
|
include_dirs: [
|
||||||
"system/core/base/include",
|
"system/core/base/include",
|
||||||
"system/core/init"
|
"system/core/init"
|
||||||
|
],
|
||||||
|
shared_libs: [
|
||||||
|
"libbase",
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -20,10 +20,18 @@
|
|||||||
#define _REALLY_INCLUDE_SYS__SYSTEM_PROPERTIES_H_
|
#define _REALLY_INCLUDE_SYS__SYSTEM_PROPERTIES_H_
|
||||||
#include <sys/_system_properties.h>
|
#include <sys/_system_properties.h>
|
||||||
|
|
||||||
#include "vendor_init.h"
|
|
||||||
#include "property_service.h"
|
#include "property_service.h"
|
||||||
|
|
||||||
using android::init::property_set;
|
void property_override(char const prop[], char const value[])
|
||||||
|
{
|
||||||
|
auto pi = (prop_info *) __system_property_find(prop);
|
||||||
|
|
||||||
|
if (pi != nullptr) {
|
||||||
|
__system_property_update(pi, value, strlen(value));
|
||||||
|
} else {
|
||||||
|
__system_property_add(prop, strlen(prop), value, strlen(value));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void load_dalvik_properties()
|
void load_dalvik_properties()
|
||||||
{
|
{
|
||||||
@@ -63,12 +71,12 @@ void load_dalvik_properties()
|
|||||||
heapmaxfree = "8m";
|
heapmaxfree = "8m";
|
||||||
}
|
}
|
||||||
|
|
||||||
property_set("dalvik.vm.heapstartsize", heapstartsize);
|
property_override("dalvik.vm.heapstartsize", heapstartsize);
|
||||||
property_set("dalvik.vm.heapgrowthlimit", heapgrowthlimit);
|
property_override("dalvik.vm.heapgrowthlimit", heapgrowthlimit);
|
||||||
property_set("dalvik.vm.heapsize", heapsize);
|
property_override("dalvik.vm.heapsize", heapsize);
|
||||||
property_set("dalvik.vm.heaptargetutilization", heaptargetutilization);
|
property_override("dalvik.vm.heaptargetutilization", heaptargetutilization);
|
||||||
property_set("dalvik.vm.heapminfree", heapminfree);
|
property_override("dalvik.vm.heapminfree", heapminfree);
|
||||||
property_set("dalvik.vm.heapmaxfree", heapmaxfree);
|
property_override("dalvik.vm.heapmaxfree", heapmaxfree);
|
||||||
}
|
}
|
||||||
|
|
||||||
void vendor_load_properties()
|
void vendor_load_properties()
|
||||||
|
|||||||
Reference in New Issue
Block a user