Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 9b558853 authored by Kelvin Zhang's avatar Kelvin Zhang Committed by David Anderson
Browse files

Add ro.vendor.build.dont_use_vabc to disable VABC OTA

This prop is owned by OEM, OEM can set this if they want to disable
VABC.

Test: m dist, make sure generated OTA has VABC disabled
Bug: 185400304

Change-Id: Iceb2fb1f399d38a51722352a86ddf68af05fa24e
Merged-In: Iceb2fb1f399d38a51722352a86ddf68af05fa24e
parent 25859693
Loading
Loading
Loading
Loading
+7 −0
Original line number Diff line number Diff line
@@ -313,6 +313,13 @@ ADDITIONAL_VENDOR_PROPERTIES += \
endif
endif

# Set build prop. This prop is read by ota_from_target_files when generating OTA,
# to decide if VABC should be disabled.
ifeq ($(BOARD_DONT_USE_VABC_OTA),true)
ADDITIONAL_VENDOR_PROPERTIES += \
    ro.vendor.build.dont_use_vabc=true
endif

ADDITIONAL_VENDOR_PROPERTIES += \
    ro.vendor.build.security_patch=$(VENDOR_SECURITY_PATCH) \
    ro.product.board=$(TARGET_BOOTLOADER_BOARD_NAME) \
+7 −0
Original line number Diff line number Diff line
@@ -450,6 +450,13 @@ class BuildInfo(object):
        vendor_prop.GetProp("ro.virtual_ab.compression.enabled") == "true"
    return vabc_enabled

  @property
  def vendor_suppressed_vabc(self):
    vendor_prop = self.info_dict.get("vendor.build.prop")
    vabc_suppressed = vendor_prop and \
        vendor_prop.GetProp("ro.vendor.build.dont_use_vabc")
    return vabc_suppressed and vabc_suppressed.lower() == "true"

  @property
  def oem_props(self):
    return self._oem_props
+4 −0
Original line number Diff line number Diff line
@@ -1063,6 +1063,7 @@ def GenerateAbOtaPackage(target_file, output_file, source_file=None):
    # serve I/O request when device boots. Therefore, disable VABC if source
    # build doesn't supports it.
    if not source_info.is_vabc or not target_info.is_vabc:
      logger.info("Either source or target does not support VABC, disabling.")
      OPTIONS.disable_vabc = True

  else:
@@ -1071,6 +1072,9 @@ def GenerateAbOtaPackage(target_file, output_file, source_file=None):
    target_info = common.BuildInfo(OPTIONS.info_dict, OPTIONS.oem_dicts)
    source_info = None

  if target_info.vendor_suppressed_vabc:
    logger.info("Vendor suppressed VABC. Disabling")
    OPTIONS.disable_vabc = True
  additional_args = []

  # Prepare custom images.