Reland "Add a wrapper class PartitionBuildProp""
This reverts commit 6022545272
.
The build prop for a partition used to be a simple key:value
dictionary. But we need more fields to hold the alternative build
props overriden by the 'import' statement. Therefore, add a new
class as a wrapper for these props first.
Bug: 152167826
Change-Id: I5c952cd2a976ba1a09ddc66d56c2b8b55a61986b
Test: unittests pass
This commit is contained in:
@@ -509,9 +509,9 @@ def ImagePropFromGlobalDict(glob_dict, mount_point):
|
||||
d = {}
|
||||
|
||||
if "build.prop" in glob_dict:
|
||||
bp = glob_dict["build.prop"]
|
||||
if "ro.build.date.utc" in bp:
|
||||
d["timestamp"] = bp["ro.build.date.utc"]
|
||||
timestamp = glob_dict["build.prop"].GetProp("ro.build.date.utc")
|
||||
if timestamp:
|
||||
d["timestamp"] = timestamp
|
||||
|
||||
def copy_prop(src_p, dest_p):
|
||||
"""Copy a property from the global dictionary.
|
||||
|
Reference in New Issue
Block a user