Skip to content
This repository has been archived by the owner on Jan 29, 2024. It is now read-only.

Commit

Permalink
libra: Adjust AAPT and dalvik-heap configs
Browse files Browse the repository at this point in the history
Build for devices with xxhdpi screen and 4GB- RAM.

Change-Id: I3a16402c40d7d04533056742c45dfdb07a0e8d64
  • Loading branch information
BYZYB committed Jun 2, 2021
1 parent c1c1733 commit 335b0c4
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 13 deletions.
1 change: 0 additions & 1 deletion device.mk
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
# limitations under the License.

# AAPT
PRODUCT_AAPT_CONFIG := normal
PRODUCT_AAPT_PREF_CONFIG := xxhdpi

# APEX
Expand Down
8 changes: 5 additions & 3 deletions init/init_libra.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -74,13 +74,15 @@ void vendor_load_properties()
struct sysinfo sys;
sysinfo(&sys);

// Set memory properties for Mi-4c with 2GB RAM
// Set memory properties for Mi-4c with 2GB RAM (values from phone-xhdpi-2048-dalvik-heap.mk)
if (sys.totalram <= RAM_SIZE_2GB)
{
property_override("dalvik.vm.heapgrowthlimit", "192m");
property_override("dalvik.vm.heapminfree", "2m");
property_override("dalvik.vm.heapmaxfree", "8m");
property_override("dalvik.vm.heapminfree", "512k");
property_override("dalvik.vm.heapsize", "512m");
property_override("dalvik.vm.heapstartsize", "16m");
property_override("dalvik.vm.heapstartsize", "8m");
property_override("dalvik.vm.heaptargetutilization", "0.75");
property_override("ro.config.low_ram", "true");
}

Expand Down
1 change: 1 addition & 0 deletions lineage_libra.mk
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ $(call inherit-product, $(SRC_TARGET_DIR)/product/core_64_bit.mk)
$(call inherit-product, $(SRC_TARGET_DIR)/product/full_base_telephony.mk)
$(call inherit-product, $(SRC_TARGET_DIR)/product/languages_full.mk)
$(call inherit-product, $(SRC_TARGET_DIR)/product/product_launched_with_l_mr1.mk)
$(call inherit-product, frameworks/native/build/phone-xhdpi-4096-dalvik-heap.mk)
$(call inherit-product, vendor/xiaomi/libra/libra-vendor.mk)

# Inherit some common Lineage stuff.
Expand Down
9 changes: 0 additions & 9 deletions system_prop.mk
Original file line number Diff line number Diff line change
Expand Up @@ -53,15 +53,6 @@ PRODUCT_PROPERTY_OVERRIDES += \
PRODUCT_PRODUCT_PROPERTIES += \
ro.charger.enable_suspend=true

# Dalvik heap
PRODUCT_DEFAULT_PROPERTY_OVERRIDES += \
dalvik.vm.heapgrowthlimit=288m \
dalvik.vm.heapmaxfree=8m \
dalvik.vm.heapminfree=512k \
dalvik.vm.heapsize=768m \
dalvik.vm.heapstartsize=8m \
dalvik.vm.heaptargetutilization=0.75

# Dexpreopt
PRODUCT_DEFAULT_PROPERTY_OVERRIDES += \
dalvik.vm.dex2oat-filter=everything \
Expand Down

0 comments on commit 335b0c4

Please sign in to comment.