Check device's launch API level before using new compresison algo

If a T launch device later changes to LZ4(which is supported since U),
we will fallback to older compression algorithms, because if the full
OTA is applied on an T build, the update_engine on device won't support
lz4.

Bug: 295989519
Test: generate full OTA for T launched devices, make sure lz4 is not
used

Change-Id: I82fdf788e47e2a6daeaa4479bfecf317d8ebb5d5
This commit is contained in:
Kelvin Zhang
2023-08-16 13:16:48 -07:00
parent cadce2a071
commit 8f83000732
3 changed files with 40 additions and 2 deletions

View File

@@ -449,6 +449,10 @@ class BuildInfo(object):
system_prop = self.info_dict.get("system.build.prop")
return system_prop and system_prop.GetProp("ro.build.version.release") == "11"
@property
def vabc_compression_param(self):
return self.get("virtual_ab_compression_method", "")
@property
def vendor_api_level(self):
vendor_prop = self.info_dict.get("vendor.build.prop")