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(
활성화 확인을 위해 apex 모듈에서 apex 정보를 수집합니다. |
boolean
|
containsPersistentApk(
입력 파일에 영구 APK가 포함되어 있는지 확인합니다. |
|
getApkInstalled()
|
String
|
getBundletoolFileName()
|
BundletoolUtil
|
getBundletoolUtil()
|
String
|
getModuleKeywordFromApexPackageName(String packageName)
키워드 (예: 'tzdata'(com.android.tzdata.apex의 경우)를 가져옵니다. |
|
getModulesFailToActivate(
활성화되지 않은 모듈을 가져옵니다. |
|
getSplitsForApks(TestInformation testInfo, File moduleFile)
지정된 APK의 분할을 추출하여 반환합니다. |
void
|
initBundletoolUtil(TestInformation testInfo)
이 클래스의 bundletool 유틸리티를 초기화합니다. |
void
|
installTrain(TestInformation testInfo,
기기에 apex가 포함된 메인라인 트레인을 설치하려고 시도합니다. |
void
|
installUsingBundleTool(TestInformation testInfo,
bundletool을 사용하여 메인라인 모듈을 설치하려고 시도합니다. |
void
|
installer(TestInformation testInfo,
기기에 패키지 또는 분할 패키지를 설치하려고 시도합니다. |
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
publicgetModulesToInstall (TestInformation testInfo)
기기에 미리 로드된 모듈을 기반으로 트레인에 설치해야 하는 모듈을 가져옵니다. 미리 로드되지 않은 모듈은 설치되지 않습니다.
매개변수 | |
---|---|
testInfo |
TestInformation : TestInformation |
반환 값 | |
---|---|
|
기기에 설치해야 하는 모듈 목록입니다. |
생성 값 | |
---|---|
DeviceNotAvailableException |
기기를 사용할 수 없는 경우 |
TargetSetupError |
필수 모듈이 설치되지 않았거나 모듈을 설치할 수 없는 경우 |
setIgnoreIfNotPreloaded
public void setIgnoreIfNotPreloaded (boolean skip)
매개변수 | |
---|---|
skip |
boolean |
setSkipApexTearDown
public void setSkipApexTearDown (boolean skip)
매개변수 | |
---|---|
skip |
boolean |
setUp
public void setUp (TestInformation testInfo)
매개변수 | |
---|---|
testInfo |
TestInformation |
생성 값 | |
---|---|
BuildError |
|
DeviceNotAvailableException |
|
TargetSetupError |
tearDown
public void tearDown (TestInformation testInfo, Throwable e)
매개변수 | |
---|---|
testInfo |
TestInformation |
e |
Throwable |
생성 값 | |
---|---|
DeviceNotAvailableException |
보호된 메서드
addApksToTestFiles
protected void addApksToTestFiles ()
collectApexInfoFromApexModules
protectedcollectApexInfoFromApexModules ( testAppFileNames, TestInformation testInfo)
활성화 확인을 위해 apex 모듈에서 apex 정보를 수집합니다.
매개변수 | |
---|---|
testAppFileNames |
: 설치할 모듈의 파일 이름 목록입니다. |
testInfo |
TestInformation : TestInformation |
반환 값 | |
---|---|
|
입력 파일 목록에 있는 apex 모듈의 apexinfo가 포함된 목록 |
생성 값 | |
---|---|
TargetSetupError |
containsPersistentApk
protected boolean containsPersistentApk (testAppFileNames, TestInformation testInfo)
입력 파일에 영구 APK가 포함되어 있는지 확인합니다.
매개변수 | |
---|---|
testAppFileNames |
: 설치할 모듈의 파일 이름 목록입니다. |
testInfo |
TestInformation : TestInformation |
반환 값 | |
---|---|
boolean |
입력 파일에 영구 APK 모듈이 포함된 경우 true
|
생성 값 | |
---|---|
DeviceNotAvailableException |
|
TargetSetupError |
getApkInstalled
protectedgetApkInstalled ()
반환 값 | |
---|---|
|
getBundletoolFileName
protected String getBundletoolFileName ()
반환 값 | |
---|---|
String |
getModuleKeywordFromApexPackageName
protected String getModuleKeywordFromApexPackageName (String packageName)
키워드 (예: 'tzdata'(com.android.tzdata.apex의 경우)를 가져옵니다.
매개변수 | |
---|---|
packageName |
String : 앱릭스 파일의 패키지 이름입니다. |
반환 값 | |
---|---|
String |
a string The keyword of the apex package name. |
getModulesFailToActivate
protectedgetModulesFailToActivate ( activatedApexes)
활성화되지 않은 모듈을 가져옵니다.
매개변수 | |
---|---|
activatedApexes |
: 기기의 활성 꼭짓점 집합 |
반환 값 | |
---|---|
|
활성화되지 않은 입력 apex 모듈의 apexinfo가 포함된 목록입니다. |
생성 값 | |
---|---|
DeviceNotAvailableException |
|
TargetSetupError |
getSplitsForApks
protectedgetSplitsForApks (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)
기기에 apex가 포함된 메인라인 트레인을 설치하려고 시도합니다.
매개변수 | |
---|---|
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 |
retrieveApexInfo
protected ITestDevice.ApexInfo retrieveApexInfo (File testApexFile, DeviceDescriptor deviceDescriptor)
지정된 apex 파일에서 packageName 및 versionCode가 포함된 ApexInfo를 검색합니다.
매개변수 | |
---|---|
testApexFile |
File : 정보를 가져오는 에이펙스 파일입니다. |
deviceDescriptor |
DeviceDescriptor |
반환 값 | |
---|---|
ITestDevice.ApexInfo |
지정된 파일의 packageName 및 versionCode가 포함된 ApexInfo |
생성 값 | |
---|---|
TargetSetupError |
aapt 파서가 파일을 파싱하지 못한 경우 |