ModulePusher
public
class
ModulePusher
extends Object
| java.lang.Object | |
| ↳ | com.android.tradefed.targetprep.ModulePusher |
요약
중첩된 클래스 | |
|---|---|
class |
ModulePusher.ModulePushError
Mainline 모듈 푸시 중 치명적인 오류가 발생했습니다. |
상수 | |
|---|---|
String |
LINE_BREAK
|
공개 생성자 | |
|---|---|
ModulePusher(ITestDevice device, long waitTimeMs, long delayWaitingTimeMs)
|
|
공개 메서드 | |
|---|---|
void
|
installModules(ImmutableMultimap<String, File> moduleFiles, boolean factoryReset, boolean disablePackageCache)
adb 푸시를 통해 기기에 |
보호된 메서드 | |
|---|---|
void
|
checkApexActivated(ITestDevice device, List<ModulePusher.ModuleInfo> modules)
모든 apex가 활성화되어 있는지 확인합니다. |
Path
|
getApexPathUnderSystem(ITestDevice device, String packageName)
|
List<ModulePusher.ModuleInfo>
|
getModulesFailToActivate(List<ModulePusher.ModuleInfo> toInstall, Set<ITestDevice.ApexInfo> activatedApexes)
활성화되지 않은 모듈을 가져옵니다. |
String[]
|
getPathsOnDevice(ITestDevice device, String packageName)
기기에서 패키지의 설치 파일 경로를 가져옵니다. |
Path[]
|
getPreloadPaths(ITestDevice device, File[] moduleFiles, String packageName, int apiLevel)
기기에서 미리 로드된 패키지의 경로를 가져옵니다. |
ImmutableMap<String, String>
|
parsePackageVersionCodes(String output)
'package:{key} versionCode:{value}' 줄을 맵으로 파싱합니다. |
void
|
setupDevice(ITestDevice device)
/system 아래에 파일을 푸시하기 전에 adb root 및 기기 재마운트 |
void
|
waitForDeviceToBeResponsive(long waitTime)
|
상수
LINE_BREAK
public static final String LINE_BREAK
상수 값: "\r?\n"
공개 생성자
ModulePusher
public ModulePusher (ITestDevice device, long waitTimeMs, long delayWaitingTimeMs)
| 매개변수 | |
|---|---|
device |
ITestDevice |
waitTimeMs |
long |
delayWaitingTimeMs |
long |
공개 메서드
installModules
public void installModules (ImmutableMultimap<String, File> moduleFiles,
boolean factoryReset,
boolean disablePackageCache)adb 푸시를 통해 기기에 moduleFiles를 설치합니다.
| 매개변수 | |
|---|---|
moduleFiles |
ImmutableMultimap: 패키지 이름에서 패키지 파일로의 멀티맵입니다. 분할된 경우 기본 패키지가 반복 순서에서 첫 번째여야 합니다. |
factoryReset |
boolean: 공장 초기화를 통해 다시 로드하는 경우 |
disablePackageCache |
boolean |
| 생성 값 | |
|---|---|
DeviceNotAvailableException |
|
ModulePusher.ModulePushError |
|
TargetSetupError |
|
보호된 메서드
checkApexActivated
protected void checkApexActivated (ITestDevice device, List<ModulePusher.ModuleInfo> modules)
모든 apex가 활성화되어 있는지 확인합니다.
| 매개변수 | |
|---|---|
device |
ITestDevice: 테스트 중입니다. |
modules |
List |
| 생성 값 | |
|---|---|
ModulePusher.ModulePushError |
활성화에 실패한 경우 |
DeviceNotAvailableException |
|
getApexPathUnderSystem
protected Path getApexPathUnderSystem (ITestDevice device, String packageName)
| 매개변수 | |
|---|---|
device |
ITestDevice |
packageName |
String |
| 반환 | |
|---|---|
Path |
|
| 생성 값 | |
|---|---|
DeviceNotAvailableException |
|
ModulePusher.ModulePushError |
|
getModulesFailToActivate
protected List<ModulePusher.ModuleInfo> getModulesFailToActivate (List<ModulePusher.ModuleInfo> toInstall,
Set<ITestDevice.ApexInfo> activatedApexes)활성화되지 않은 모듈을 가져옵니다.
| 매개변수 | |
|---|---|
toInstall |
List |
activatedApexes |
Set: 기기에서 활성 상태인 꼭짓점 집합 |
| 반환 | |
|---|---|
List<ModulePusher.ModuleInfo> |
활성화되지 않은 입력 Apex 모듈의 apexinfo가 포함된 목록 |
getPathsOnDevice
protected String[] getPathsOnDevice (ITestDevice device, String packageName)
기기에서 패키지의 설치 파일 경로를 가져옵니다.
| 매개변수 | |
|---|---|
device |
ITestDevice: 테스트 중 |
packageName |
String: 모듈 |
| 반환 | |
|---|---|
String[] |
패키지의 모든 파일 경로 |
| 생성 값 | |
|---|---|
DeviceNotAvailableException |
기기를 사용할 수 없는 경우 |
ModulePusher.ModulePushError |
|
getPreloadPaths
protected Path[] getPreloadPaths (ITestDevice device, File[] moduleFiles, String packageName, int apiLevel)
기기에서 미리 로드된 패키지의 경로를 가져옵니다.
분할 패키지의 경우 패키지 디렉터리의 경로와 파일 경로를 반환합니다. 따라서 이 경우 반환 크기는 항상 1보다 큽니다. 분할되지 않은 패키지의 경우 미리 로드 설치 파일의 경로를 반환하면 됩니다.
| 매개변수 | |
|---|---|
device |
ITestDevice: 테스트 중 |
moduleFiles |
File: 설치할 로컬 모듈 파일 |
packageName |
String: 모듈 |
apiLevel |
int: 기기의 |
| 반환 | |
|---|---|
Path[] |
미리 로드 파일의 경로입니다. |
| 생성 값 | |
|---|---|
DeviceNotAvailableException |
|
ModulePusher.ModulePushError |
|
parsePackageVersionCodes
protected ImmutableMap<String, String> parsePackageVersionCodes (String output)
'package:{key} versionCode:{value}' 줄을 맵으로 파싱합니다.
| 매개변수 | |
|---|---|
output |
String |
| 반환 | |
|---|---|
ImmutableMap<String, String> |
|
setupDevice
protected void setupDevice (ITestDevice device)
/system 아래에 파일을 푸시하기 전에 adb root 및 기기 재마운트
| 매개변수 | |
|---|---|
device |
ITestDevice |
| 생성 값 | |
|---|---|
DeviceNotAvailableException |
기기를 사용할 수 없는 경우 |
ModulePusher.ModulePushError |
기기를 다시 마운트할 수 없는 경우 |
waitForDeviceToBeResponsive
protected void waitForDeviceToBeResponsive (long waitTime)
| 매개변수 | |
|---|---|
waitTime |
long |