Move ro.product.first_api_level to vendor/build.prop

Shipping API level is associated with the vendor image. When
a device ships in, say, O and is then run against the O-MR1
GSI image, the shipping API level is currently reported as
the shipping API level which the GSI was built with. This means
that various tests and control flows assume that the image
is the newest possible image. However, this is not the case.

Bug: 67965044
Test: boot on pixel
Change-Id: If18cc99e2599957d88860e0902a99ff3f67e5fd8
This commit is contained in:
Steven Moreland 2017-10-22 02:11:47 -07:00 committed by Jaekyun Seok
parent 4c06d64955
commit 9411f9b4dc
1 changed files with 6 additions and 1 deletions

View File

@ -336,7 +336,11 @@ endif
$(INSTALLED_BUILD_PROP_TARGET): $(intermediate_system_build_prop) $(INSTALLED_RECOVERYIMAGE_TARGET)
@echo "Target build info: $@"
ifdef BOARD_VENDORIMAGE_FILE_SYSTEM_TYPE
$(hide) grep -v 'ro.product.first_api_level' $(intermediate_system_build_prop) > $@
else
$(hide) cat $(intermediate_system_build_prop) > $@
endif
ifdef INSTALLED_RECOVERYIMAGE_TARGET
$(hide) echo ro.expect.recovery_id=`cat $(RECOVERYIMAGE_ID_FILE)` >> $@
endif
@ -356,10 +360,11 @@ FINAL_VENDOR_BUILD_PROPERTIES := $(call uniq-pairs-by-first-component, \
$(FINAL_VENDOR_BUILD_PROPERTIES),=)
endif # property_overrides_split_enabled
$(INSTALLED_VENDOR_BUILD_PROP_TARGET): $(VENDOR_BUILDINFO_SH)
$(INSTALLED_VENDOR_BUILD_PROP_TARGET): $(VENDOR_BUILDINFO_SH) $(intermediate_system_build_prop)
@echo Target vendor buildinfo: $@
@mkdir -p $(dir $@)
$(hide) echo > $@
$(hide) grep 'ro.product.first_api_level' $(intermediate_system_build_prop) >> $@
$(hide) echo ro.vendor.build.date=`$(DATE_FROM_FILE)`>>$@
$(hide) echo ro.vendor.build.date.utc=`$(DATE_FROM_FILE) +%s`>>$@
$(hide) echo ro.vendor.build.fingerprint="$(BUILD_FINGERPRINT_FROM_FILE)">>$@