BuildTestsZipUtils

public class BuildTestsZipUtils
extends Object

java.lang.Object
   ↳ com.android.tradefed.util.BuildTestsZipUtils


A helper class for operations related to tests zip generated by Android build system

Summary

Public constructors

BuildTestsZipUtils()

Public methods

static File getApkFile(IBuildInfo buildInfo, String apkFileName, List<File> altDirs, AltDirBehavior altDirBehavior, boolean lookupInResource, String deviceSigningKey)

Resolve the actual apk path based on testing artifact information inside build info.

Public constructors

BuildTestsZipUtils

BuildTestsZipUtils ()

Public methods

getApkFile

File getApkFile (IBuildInfo buildInfo, 
                String apkFileName, 
                List<File> altDirs, 
                AltDirBehavior altDirBehavior, 
                boolean lookupInResource, 
                String deviceSigningKey)

Resolve the actual apk path based on testing artifact information inside build info.

Parameters
buildInfo IBuildInfo: build artifact information

apkFileName String: filename of the apk to install

altDirs List: alternative search paths, in addition to path inside buildInfo

altDirBehavior AltDirBehavior: how alternative search paths should be used against path inside buildInfo: as fallback, or as override; if unspecified, fallback will be used

lookupInResource boolean: if the file should be looked up in test harness resources as a final fallback mechanism

Returns
File a File representing the physical apk file on host or null if the file does not exist.

Throws
IOException