releasetools: Fallback to "mkbootimg_args" if "recovery_mkbootimg_args" not found.

For older target_files.zip, since "recovery_mkbootimg_args" may not be
set fallback to the earlier config -"mkbootimg_args" for recovery image.
This will make releasetools backward compatible, and usable for
older/already generated target-files package.

Bug: 155708400
Change-Id: If40359130b8e6da48cb8c345d8cb079f457fe36f
Merged-In: If40359130b8e6da48cb8c345d8cb079f457fe36f
This commit is contained in:
P.Adarsh Reddy
2020-05-04 19:40:16 +05:30
committed by Steve Muckle
parent f068a60e8a
commit e4d5d568a3

View File

@@ -1109,6 +1109,10 @@ def _BuildBootableImage(image_name, sourcedir, fs_config_file, info_dict=None,
if partition_name == "recovery":
args = info_dict.get("recovery_mkbootimg_args")
if not args:
# Fall back to "mkbootimg_args" for recovery image
# in case "recovery_mkbootimg_args" is not set.
args = info_dict.get("mkbootimg_args")
else:
args = info_dict.get("mkbootimg_args")
if args and args.strip():