diff --git a/android/android_apk.bzl b/android/android_apk.bzl index ae5cfa93c..66bf15c40 100644 --- a/android/android_apk.bzl +++ b/android/android_apk.bzl @@ -177,11 +177,11 @@ def get_install_info( manifest: Artifact, exopackage_info: [ExopackageInfo, None], definitely_has_native_libs: bool = True, - staged_install_mode_default: bool = False) -> InstallInfo: + apex_mode: bool = False) -> InstallInfo: files = { ctx.attrs.name: output_apk, "manifest": manifest, - "options": generate_install_config(ctx, staged_install_mode_default), + "options": generate_install_config(ctx, apex_mode), } if exopackage_info: @@ -220,23 +220,23 @@ def get_install_info( files = files, ) -def generate_install_config(ctx: AnalysisContext, staged_install_mode_default: bool) -> Artifact: - data = get_install_config(staged_install_mode_default) +def generate_install_config(ctx: AnalysisContext, apex_mode: bool) -> Artifact: + data = get_install_config(apex_mode) return ctx.actions.write_json("install_android_options.json", data) -def get_install_config(staged_install_mode_default: bool) -> dict[str, typing.Any]: +def get_install_config(apex_mode: bool) -> dict[str, typing.Any]: # TODO: read from toolchains - staged_install_mode = read_root_config("adb", "staged_install_mode", None) install_config = { "adb_restart_on_failure": read_root_config("adb", "adb_restart_on_failure", "true"), "agent_port_base": read_root_config("adb", "agent_port_base", "2828"), "always_use_java_agent": read_root_config("adb", "always_use_java_agent", "false"), + "apex_mode": apex_mode, "is_zstd_compression_enabled": read_root_config("adb", "is_zstd_compression_enabled", "false"), "max_retries": read_root_config("adb", "retries", "5"), "multi_install_mode": read_root_config("adb", "multi_install_mode", "false"), "retry_delay_millis": read_root_config("adb", "retry_delay_millis", "500"), "skip_install_metadata": read_root_config("adb", "skip_install_metadata", "false"), - "staged_install_mode": staged_install_mode_default if staged_install_mode == None else staged_install_mode, + "staged_install_mode": read_root_config("adb", "staged_install_mode", None), } adb_executable = read_root_config("android", "adb", None)