sm6250-common: init: group dalvik property initialization together
This commit is contained in:
parent
6fdeeb9833
commit
a0c7e0c3c9
@ -30,15 +30,13 @@
|
||||
using android::base::GetProperty;
|
||||
using android::init::property_set;
|
||||
|
||||
char const *heapstartsize;
|
||||
char const *heapgrowthlimit;
|
||||
char const *heapsize;
|
||||
char const *heapminfree;
|
||||
char const *heapmaxfree;
|
||||
char const *heaptargetutilization;
|
||||
|
||||
void check_device()
|
||||
{
|
||||
void load_dalvik_properties() {
|
||||
char const *heapstartsize;
|
||||
char const *heapgrowthlimit;
|
||||
char const *heapsize;
|
||||
char const *heapminfree;
|
||||
char const *heapmaxfree;
|
||||
char const *heaptargetutilization;
|
||||
struct sysinfo sys;
|
||||
|
||||
sysinfo(&sys);
|
||||
@ -59,12 +57,9 @@ void check_device()
|
||||
heaptargetutilization = "0.6";
|
||||
heapminfree = "8m";
|
||||
heapmaxfree = "16m";
|
||||
} else {
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
void vendor_load_properties()
|
||||
{
|
||||
check_device();
|
||||
|
||||
property_set("dalvik.vm.heapstartsize", heapstartsize);
|
||||
property_set("dalvik.vm.heapgrowthlimit", heapgrowthlimit);
|
||||
@ -73,3 +68,7 @@ void vendor_load_properties()
|
||||
property_set("dalvik.vm.heapminfree", heapminfree);
|
||||
property_set("dalvik.vm.heapmaxfree", heapmaxfree);
|
||||
}
|
||||
|
||||
void vendor_load_properties() {
|
||||
load_dalvik_properties();
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user