모듈 푸셔
public class ModulePusher
extends Object
java.lang.객체 | |
↳ | com.android.tradefed.targetprep.ModulePusher |
요약
중첩 클래스 | |
---|---|
class | ModulePusher.ModulePushError 메인라인 모듈 푸시 중 치명적인 오류. |
필드 | |
---|---|
public static final 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, modules) checkApexActivated ( ITestDevice device, modules) 모든 정점이 활성화되었는지 확인합니다. |
Path | getApexPathUnderSystem ( ITestDevice device, String packageName) |
getModulesFailToActivate ( toInstall, activatedApexes) getModulesFailToActivate ( toInstall, activatedApexes) getModulesFailToActivate ( toInstall, 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 루트 및 다시 마운트 장치 |
void | waitForDeviceToBeResponsive (long waitTime) |
필드
줄 바꿈
public static final String LINE_BREAK
공개 생성자
모듈 푸셔
public ModulePusher (ITestDevice device, long waitTimeMs, long delayWaitingTimeMs)
매개변수 | |
---|---|
device | ITestDevice |
waitTimeMs | long |
delayWaitingTimeMs | long |
공개 방법
설치 모듈
public void installModules (ImmutableMultimap<String, File> moduleFiles, boolean factoryReset, boolean disablePackageCache)
adb 푸시로 moduleFiles
기기에 설치합니다.
매개변수 | |
---|---|
moduleFiles | ImmutableMultimap : 패키지 이름에서 패키지 파일로의 멀티매핑. 분할된 경우 기본 패키지는 반복 순서에서 첫 번째여야 합니다. |
factoryReset | boolean : 공장 초기화를 통해 다시 로드하는 경우. |
disablePackageCache | boolean |
던지기 | |
---|---|
DeviceNotAvailableException | |
ModulePusher.ModulePushError | |
TargetSetupError |
보호된 메서드
checkApex활성화됨
protected void checkApexActivated (ITestDevice device,modules)
모든 정점이 활성화되었는지 확인합니다.
매개변수 | |
---|---|
device | ITestDevice : 테스트 중입니다. |
modules |
던지기 | |
---|---|
ModulePusher.ModulePushError | 활성화에 실패한 경우. |
DeviceNotAvailableException |
getApexPathUnderSystem
protected Path getApexPathUnderSystem (ITestDevice device, String packageName)
매개변수 | |
---|---|
device | ITestDevice |
packageName | String |
보고 | |
---|---|
Path |
던지기 | |
---|---|
DeviceNotAvailableException | |
ModulePusher.ModulePushError |
getModulesFailToActivate
protectedgetModulesFailToActivate ( toInstall, activatedApexes)
활성화에 실패한 모듈을 가져옵니다.
매개변수 | |
---|---|
toInstall | |
activatedApexes |
보고 | |
---|---|
활성화에 실패한 입력 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)
장치에서 사전 로드 패키지의 경로를 가져옵니다.
분할 패키지의 경우 패키지 dir 경로와 파일 경로를 반환합니다. 결과적으로 이 경우 반환 크기는 항상 > 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> |
설정 장치
protected void setupDevice (ITestDevice device)
/system에서 파일을 푸시하기 전에 adb 루트 및 다시 마운트 장치
매개변수 | |
---|---|
device | ITestDevice |
던지기 | |
---|---|
ModulePusher.ModulePushError | 장치를 다시 마운트할 수 없는 경우. |
DeviceNotAvailableException | 장치를 사용할 수 없는 경우. |
waitForDeviceToBeResponsive
protected void waitForDeviceToBeResponsive (long waitTime)
매개변수 | |
---|---|
waitTime | long |
이 페이지에 나와 있는 콘텐츠와 코드 샘플에는 콘텐츠 라이선스에서 설명하는 라이선스가 적용됩니다. 자바 및 OpenJDK는 Oracle 및 Oracle 계열사의 상표 또는 등록 상표입니다.
최종 업데이트: 2023-03-30(UTC)