InstallApkSetup

public class InstallApkSetup
extends BaseTargetPreparer

java.lang.Object
   ↳ com.android.tradefed.targetprep.BaseTargetPreparer
     ↳ com.android.tradefed.targetprep.InstallApkSetup


A ITargetPreparer that installs one or more apks located on the filesystem.

This class should only be used for installing apks from the filesystem when all versions of the test rely on the apk being on the filesystem. For tests which use TestAppInstallSetup to install apks from the tests zip file, use --alt-dir to specify an alternate directory on the filesystem containing the apk for other test configurations (for example, local runs where the tests zip file is not present).

Summary

Public constructors

InstallApkSetup()

Public methods

void setApkPaths( paths)

Sets APK paths.

void setThrowIfInstallFail(boolean throwIfInstallFail)

Set throw if install fail.

void setUp(ITestDevice device, IBuildInfo buildInfo)

Protected methods

getApkPaths()

Public constructors

InstallApkSetup

public InstallApkSetup ()

Public methods

setApkPaths

public void setApkPaths ( paths)

Sets APK paths. Exposed for testing.

Parameters
paths

setThrowIfInstallFail

public void setThrowIfInstallFail (boolean throwIfInstallFail)

Set throw if install fail. Exposed for testing.

Parameters
throwIfInstallFail boolean

setUp

public void setUp (ITestDevice device, 
                IBuildInfo buildInfo)

Parameters
device ITestDevice

buildInfo IBuildInfo

Throws
BuildError
DeviceNotAvailableException
TargetSetupError

Protected methods

getApkPaths

protected  getApkPaths ()

Returns