InstallApexModuleTargetPreparer

public class InstallApexModuleTargetPreparer
extends SuiteApkInstaller

java.lang.Object의 클래스
   ↳ com.android.tradefed.targetprep.BaseTargetPreparer
     ↳ com.android.tradefed.targetprep.TestAppInstallSetup에 있어야 합니다.
       ↳ com.android.tradefed.targetprep.suite.SuiteApkInstaller)
         ↳ com.android.tradefed.targetprep.InstallApexModuleTargetPreparer


요약

필드

protected static final String APEX_SUFFIX

protected static final String APK_SUFFIX

protected static final String SPLIT_APKS_SUFFIX

공개 생성자

InstallApexModuleTargetPreparer()

공개 메서드

getModulesToInstall(TestInformation testInfo)

트레인에 미리 로드된 모듈에 따라 트레인에 설치되어야 하는 모듈을 가져옵니다. 있습니다.

void setIgnoreIfNotPreloaded(boolean skip)
void setSkipApexTearDown(boolean skip)
void setUp(TestInformation testInfo)

void tearDown(TestInformation testInfo, Throwable e)

보호된 메서드

void addApksToTestFiles()
collectApexInfoFromApexModules( testAppFileNames, TestInformation testInfo)

활성화 확인을 위해 apex 모듈에서 루트 정보를 수집합니다.

boolean containsPersistentApk( testAppFileNames, TestInformation testInfo)

입력 파일에 영구 APK가 포함되어 있는지 확인합니다.

getApkInstalled()
String getBundletoolFileName()
BundletoolUtil getBundletoolUtil()
String getModuleKeywordFromApexPackageName(String packageName)

키워드를 가져옵니다 (예: 'tzdata' apex 패키지 이름에서)를 삭제합니다.

getModulesFailToActivate( activatedApexes)

활성화하지 못한 모듈을 가져옵니다.

getSplitsForApks(TestInformation testInfo, File moduleFile)

지정된 APK의 분할을 추출하여 반환합니다.

void initBundletoolUtil(TestInformation testInfo)

이 클래스의 bundletool 유틸리티를 초기화합니다.

void installTrain(TestInformation testInfo, moduleFilenames, String[] extraArgs)

기기에 루트가 포함된 메인라인 트레인을 설치하려고 시도합니다.

void installUsingBundleTool(TestInformation testInfo, testAppFileNames)

bundletool을 사용하여 메인라인 모듈 설치를 시도합니다.

void installer(TestInformation testInfo, testAppFileNames)

기기에 패키지 또는 분할 패키지를 설치해 봅니다.

boolean isPersistentApk(File filename, TestInformation testInfo)

APK가 영구 APK인지 확인합니다.

ITestDevice.ApexInfo retrieveApexInfo(File testApexFile, DeviceDescriptor deviceDescriptor)

지정된 apex 파일에서 packageName 및 versionCode를 포함하는 ApexInfo를 검색합니다.

필드

APEX_SUFFIX

protected static final String APEX_SUFFIX

APK_SUFFIX

protected static final String APK_SUFFIX

SPLIT_APKS_SUFFIX

protected static final String SPLIT_APKS_SUFFIX

공개 생성자

InstallApexModuleTargetPreparer

public InstallApexModuleTargetPreparer ()

공개 메서드

getModulesToInstall

public  getModulesToInstall (TestInformation testInfo)

트레인에 미리 로드된 모듈에 따라 트레인에 설치되어야 하는 모듈을 가져옵니다. 있습니다. 미리 로드되지 않은 모듈은 설치되지 않습니다.

매개변수
testInfo TestInformation: TestInformation

반환 값
기기에 설치해야 하는 모듈 목록입니다.

생성 값
DeviceNotAvailableException 기기를 사용할 수 없을 때
TargetSetupError 필수 모듈이 설치되지 않았거나 모듈이 설치해야 합니다.

setIgnoreIfNotPreloaded

public void setIgnoreIfNotPreloaded (boolean skip)

매개변수
skip boolean

setSkipApexTearDown

public void setSkipApexTearDown (boolean skip)

매개변수
skip boolean

설정

public void setUp (TestInformation testInfo)

매개변수
testInfo TestInformation

생성 값
BuildError
DeviceNotAvailableException
TargetSetupError

해체

public void tearDown (TestInformation testInfo, 
                Throwable e)

매개변수
testInfo TestInformation

e Throwable

생성 값
DeviceNotAvailableException

보호된 메서드

addApksToTestFiles

protected void addApksToTestFiles ()

collectApexInfoFromApexModules

protected  collectApexInfoFromApexModules ( testAppFileNames, 
                TestInformation testInfo)

활성화 확인을 위해 apex 모듈에서 루트 정보를 수집합니다.

매개변수
testAppFileNames : 설치할 모듈의 파일 이름 목록입니다.

testInfo TestInformation: TestInformation

반환 값
입력 파일 목록에 있는 apex 모듈의 apexinfo가 포함된 목록

생성 값
TargetSetupError

포함PersistentApk

protected boolean containsPersistentApk ( testAppFileNames, 
                TestInformation testInfo)

입력 파일에 영구 APK가 포함되어 있는지 확인합니다.

매개변수
testAppFileNames : 설치할 모듈의 파일 이름 목록입니다.

testInfo TestInformation: TestInformation

반환 값
boolean true: 입력 파일에 영구 APK 모듈이 포함된 경우

생성 값
DeviceNotAvailableException
TargetSetupError

GetApkInstalled

protected  getApkInstalled ()

반환 값

getBundletoolFileName

protected String getBundletoolFileName ()

반환 값
String

getBundletoolUtil

protected BundletoolUtil getBundletoolUtil ()

반환 값
BundletoolUtil

getModuleKeywordFromApexPackageName

protected String getModuleKeywordFromApexPackageName (String packageName)

키워드를 가져옵니다 (예: 'tzdata' apex 패키지 이름에서)를 삭제합니다.

매개변수
packageName String: apex 파일의 패키지 이름입니다.

반환 값
String 문자열 루트 패키지 이름의 키워드입니다.

getModulesFailToActivate

protected  getModulesFailToActivate ( activatedApexes)

활성화하지 못한 모듈을 가져옵니다.

매개변수
activatedApexes : 기기의 활성 루트 세트

반환 값
활성화되지 못한 입력 apex 모듈의 apexinfo가 포함된 목록

생성 값
DeviceNotAvailableException
TargetSetupError

getSplitsForApks

protected  getSplitsForApks (TestInformation testInfo, 
                File moduleFile)

지정된 APK의 분할을 추출하여 반환합니다.

매개변수
testInfo TestInformation: TestInformation

moduleFile File: 분할을 추출할 모듈 파일입니다.

반환 값
분할이 포함된 File[] 입니다.

생성 값
TargetSetupError bundletool을 찾을 수 없거나 기기 사양 파일 생성에 실패한 경우

initBundletoolUtil이 적용됩니다.

protected void initBundletoolUtil (TestInformation testInfo)

이 클래스의 bundletool 유틸리티를 초기화합니다.

매개변수
testInfo TestInformation: 호출의 TestInformation입니다.

생성 값
TargetSetupError bundletool을 찾을 수 없는 경우)

installTrain

protected void installTrain (TestInformation testInfo, 
                 moduleFilenames, 
                String[] extraArgs)

기기에 루트가 포함된 메인라인 트레인을 설치하려고 시도합니다.

매개변수
testInfo TestInformation: TestInformation

moduleFilenames : 문자열 목록입니다. 사용할 메인라인 모듈의 파일 이름 목록입니다. 설치해야 합니다.

extraArgs String

생성 값
DeviceNotAvailableException
TargetSetupError

installUsingBundleTool

protected void installUsingBundleTool (TestInformation testInfo, 
                 testAppFileNames)

bundletool을 사용하여 메인라인 모듈 설치를 시도합니다.

매개변수
testInfo TestInformation: TestInformation

testAppFileNames : 설치할 미리 로드된 모듈의 파일 이름입니다.

생성 값
DeviceNotAvailableException
TargetSetupError

설치 사용자 수

protected void installer (TestInformation testInfo, 
                 testAppFileNames)

기기에 패키지 또는 분할 패키지를 설치해 봅니다.

매개변수
testInfo TestInformation: 호출을 위한 TestInformation

testAppFileNames : 설치할 APK 및 패키지입니다.

생성 값
DeviceNotAvailableException
TargetSetupError

isPersistentApk

protected boolean isPersistentApk (File filename, 
                TestInformation testInfo)

APK가 영구 APK인지 확인합니다.

매개변수
filename File: 확인할 APK 모듈 파일입니다.

testInfo TestInformation: TestInformation

반환 값
boolean 영구 APK 모듈인 경우 true입니다.

생성 값
DeviceNotAvailableException
TargetSetupError

검색 ApexInfo

protected ITestDevice.ApexInfo retrieveApexInfo (File testApexFile, 
                DeviceDescriptor deviceDescriptor)

지정된 apex 파일에서 packageName 및 versionCode를 포함하는 ApexInfo를 검색합니다.

매개변수
testApexFile File: 정보를 가져오는 apex 파일입니다.

deviceDescriptor DeviceDescriptor

반환 값
ITestDevice.ApexInfo 지정된 파일의 packageName 및 versionCode를 포함하는 ApexInfo

생성 값
TargetSetupError aapt 파서가 파일을 파싱하지 못한 경우