DexMetadataExtractor

public class DexMetadataExtractor
extends BaseTargetPreparer

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


Installa i file di metadati Dex per gli APK specificati.

Riepilogo

Campi

protected List<File> mDoInstallMultipleApks

Costruttori pubblici

DexMetadataExtractor()

Costruttore per DexMetadataExtractor.

DexMetadataExtractor(IRunUtil runUtil)

Metodi pubblici

ITestDevice getDevice()

Restituisce il dispositivo a cui deve essere applicato il preparatore.

void setAaptVersion(AaptParser.AaptVersion aaptVersion)

Imposta la versione di AAPT per l'analisi dell'APK.

void setUp(TestInformation testInfo)

Estrae i file di metadati Dex dagli APK forniti utilizzando profgen e li installa insieme agli APK.

void setUserId(int userId)

Se l'APK deve essere installato per un determinato utente, imposta l'ID dell'utente per l'installazione.

void tearDown(TestInformation testInfo, Throwable e)

Metodi protetti

File getLocalPathForFilename(TestInformation testInfo, String apkFileName)
String parsePackageName(File testAppFile)

Recupera il nome del pacchetto dall'app di test.

File resolveApkFile(TestInformation testInfo, File apkFile)

Helper per risolvere un apk nel relativo file.

Campi

mDoInstallMultipleApks

protected List<File> mDoInstallMultipleApks

Costruttori pubblici

DexMetadataExtractor

public DexMetadataExtractor ()

Costruttore per DexMetadataExtractor.

DexMetadataExtractor

public DexMetadataExtractor (IRunUtil runUtil)

Parametri
runUtil IRunUtil

Metodi pubblici

getDevice

public ITestDevice getDevice ()

Restituisce il dispositivo a cui deve essere applicato il preparatore.

Resi
ITestDevice

Genera
com.android.tradefed.targetprep.TargetSetupError
TargetSetupError

setAaptVersion

public void setAaptVersion (AaptParser.AaptVersion aaptVersion)

Imposta la versione di AAPT per l'analisi dell'APK.

Parametri
aaptVersion AaptParser.AaptVersion

setUp

public void setUp (TestInformation testInfo)

Estrae i file di metadati Dex dagli APK forniti utilizzando profgen e li installa insieme agli APK.

Parametri
testInfo TestInformation

Genera
BuildError, DeviceNotAvailableException
BuildError
DeviceNotAvailableException
TargetSetupError

setUserId

public void setUserId (int userId)

Se l'APK deve essere installato per un determinato utente, imposta l'ID dell'utente per l'installazione.

Parametri
userId int

tearDown

public void tearDown (TestInformation testInfo, 
                Throwable e)

Parametri
testInfo TestInformation

e Throwable

Genera
DeviceNotAvailableException

Metodi protetti

getLocalPathForFilename

protected File getLocalPathForFilename (TestInformation testInfo, 
                String apkFileName)

Parametri
testInfo TestInformation

apkFileName String

Resi
File

Genera
TargetSetupError

parsePackageName

protected String parsePackageName (File testAppFile)

Recupera il nome del pacchetto dall'app di test.

Parametri
testAppFile File

Resi
String

Genera
TargetSetupError

resolveApkFile

protected File resolveApkFile (TestInformation testInfo, 
                File apkFile)

Helper per risolvere un apk nel relativo file.

Parametri
testInfo TestInformation

apkFile File

Resi
File

Genera
DeviceNotAvailableException
TargetSetupError