Merge "Add ro.vendor.build.dont_use_vabc to disable VABC OTA" am: c09cda8c6c
Original change: https://android-review.googlesource.com/c/platform/build/+/1734412 Change-Id: I97143fdf5e4239085aa0e3581c79a640a1166745
This commit is contained in:
commit
61a1d6d7a3
3 changed files with 18 additions and 0 deletions
|
@ -311,6 +311,13 @@ ADDITIONAL_VENDOR_PROPERTIES += \
|
||||||
endif
|
endif
|
||||||
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
|
||||||
|
|
||||||
# Set the flag in vendor. So VTS would know if the new fingerprint format is in use when
|
# Set the flag in vendor. So VTS would know if the new fingerprint format is in use when
|
||||||
# the system images are replaced by GSI.
|
# the system images are replaced by GSI.
|
||||||
ifeq ($(BOARD_USE_VBMETA_DIGTEST_IN_FINGERPRINT),true)
|
ifeq ($(BOARD_USE_VBMETA_DIGTEST_IN_FINGERPRINT),true)
|
||||||
|
|
|
@ -453,6 +453,13 @@ class BuildInfo(object):
|
||||||
vendor_prop.GetProp("ro.virtual_ab.compression.enabled") == "true"
|
vendor_prop.GetProp("ro.virtual_ab.compression.enabled") == "true"
|
||||||
return vabc_enabled
|
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
|
@property
|
||||||
def oem_props(self):
|
def oem_props(self):
|
||||||
return self._oem_props
|
return self._oem_props
|
||||||
|
|
|
@ -1076,6 +1076,7 @@ def GenerateAbOtaPackage(target_file, output_file, source_file=None):
|
||||||
# serve I/O request when device boots. Therefore, disable VABC if source
|
# serve I/O request when device boots. Therefore, disable VABC if source
|
||||||
# build doesn't supports it.
|
# build doesn't supports it.
|
||||||
if not source_info.is_vabc or not target_info.is_vabc:
|
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
|
OPTIONS.disable_vabc = True
|
||||||
|
|
||||||
else:
|
else:
|
||||||
|
@ -1084,6 +1085,9 @@ def GenerateAbOtaPackage(target_file, output_file, source_file=None):
|
||||||
target_info = common.BuildInfo(OPTIONS.info_dict, OPTIONS.oem_dicts)
|
target_info = common.BuildInfo(OPTIONS.info_dict, OPTIONS.oem_dicts)
|
||||||
source_info = None
|
source_info = None
|
||||||
|
|
||||||
|
if target_info.vendor_suppressed_vabc:
|
||||||
|
logger.info("Vendor suppressed VABC. Disabling")
|
||||||
|
OPTIONS.disable_vabc = True
|
||||||
additional_args = []
|
additional_args = []
|
||||||
|
|
||||||
# Prepare custom images.
|
# Prepare custom images.
|
||||||
|
|
Loading…
Reference in a new issue