ModulePusher

public class ModulePusher
extends Object

java.lang.Object
   ↳ com.android.tradefed.targetprep.ModulePusher


Özet

İç içe yerleştirilmiş sınıflar

class ModulePusher.ModulePushError

Mainline modülü gönderme sırasında önemli hata oluştu. 

Sabitler

String LINE_BREAK

Herkese açık oluşturucular

ModulePusher(ITestDevice device, long waitTimeMs, long delayWaitingTimeMs)

Herkese açık yöntemler

void installModules(ImmutableMultimap<String, File> moduleFiles, boolean factoryReset, boolean disablePackageCache)

adb push komutuyla cihazda moduleFiles yüklenir.

Korunan yöntemler

void checkApexActivated(ITestDevice device, modules)

Tüm tepe noktalarının etkin olup olmadığını kontrol edin.

Path getApexPathUnderSystem(ITestDevice device, String packageName)
getModulesFailToActivate( toInstall, activatedApexes)

Etkinleştirilemeyen modülleri alın.

String[] getPathsOnDevice(ITestDevice device, String packageName)

Paketin cihazdaki yükleme dosyalarının yollarını alın.

Path[] getPreloadPaths(ITestDevice device, File[] moduleFiles, String packageName, int apiLevel)

Cihazdaki önceden yüklenmiş paketin yollarını alın.

ImmutableMap<String, String> parsePackageVersionCodes(String output)

"package:{key} versionCode:{value}" satırlarını bir haritaya ayrıştırır.

void setupDevice(ITestDevice device)

/system altına dosya göndermeden önce adb root ve remount device komutlarını kullanın.

void waitForDeviceToBeResponsive(long waitTime)

Sabitler

LINE_BREAK

public static final String LINE_BREAK

Sabit Değer: "\r?\n"

Herkese açık oluşturucular

ModulePusher

public ModulePusher (ITestDevice device, 
                long waitTimeMs, 
                long delayWaitingTimeMs)

Parametreler
device ITestDevice

waitTimeMs long

delayWaitingTimeMs long

Herkese açık yöntemler

installModules

public void installModules (ImmutableMultimap<String, File> moduleFiles, 
                boolean factoryReset, 
                boolean disablePackageCache)

adb push komutuyla cihazda moduleFiles yüklenir.

Parametreler
moduleFiles ImmutableMultimap: Paket adlarından paket dosyalarına bir çoklu harita. Bölünmüş durumda, temel paket yineleme sırasındaki ilk paket olmalıdır.

factoryReset boolean: Fabrika ayarlarına sıfırlama yoluyla yeniden yükleniyorsa.

disablePackageCache boolean

Dekoratif yastıklar
DeviceNotAvailableException
ModulePusher.ModulePushError
TargetSetupError

Korunan yöntemler

checkApexActivated

protected void checkApexActivated (ITestDevice device, 
                 modules)

Tüm tepe noktalarının etkin olup olmadığını kontrol edin.

Parametreler
device ITestDevice: Test aşamasında.

modules

Dekoratif yastıklar
ModulePusher.ModulePushError etkinleştirme başarısız olduysa
DeviceNotAvailableException

getApexPathUnderSystem

protected Path getApexPathUnderSystem (ITestDevice device, 
                String packageName)

Parametreler
device ITestDevice

packageName String

İlerlemeler
Path

Dekoratif yastıklar
DeviceNotAvailableException
ModulePusher.ModulePushError

getModulesFailToActivate

protected  getModulesFailToActivate ( toInstall, 
                 activatedApexes)

Etkinleştirilemeyen modülleri alın.

Parametreler
toInstall

activatedApexes : Cihazdaki etkin tepe noktaları kümesi

İlerlemeler
Etkinleştirilemeyen giriş apex modüllerinin apexinfo'sunu içeren bir liste.

getPathsOnDevice

protected String[] getPathsOnDevice (ITestDevice device, 
                String packageName)

Paketin cihazdaki yükleme dosyalarının yollarını alın.

Parametreler
device ITestDevice: test aşamasında

packageName String: Modülün

İlerlemeler
String[] paketin tüm dosyalarının yolları

Dekoratif yastıklar
DeviceNotAvailableException Cihaz kullanılamıyorsa
ModulePusher.ModulePushError

getPreloadPaths

protected Path[] getPreloadPaths (ITestDevice device, 
                File[] moduleFiles, 
                String packageName, 
                int apiLevel)

Cihazdaki önceden yüklenmiş paketin yollarını alın.

Bölünmüş paketler için paket dizininin yolunu ve ardından dosyaların yollarını döndürün. Bu nedenle, bu durumda dönüş boyutu her zaman > 1 olur. Bölünmemiş paketler için önceden yükleme yükleme dosyasının yolunu döndürmeniz yeterlidir.

Parametreler
device ITestDevice: test aşamasında

moduleFiles File: Yüklenecek yerel modül dosyaları

packageName String: modülün

apiLevel int: cihazın

İlerlemeler
Path[] Önceden yükleme dosyalarının yolları.

Dekoratif yastıklar
DeviceNotAvailableException
ModulePusher.ModulePushError

parsePackageVersionCodes

protected ImmutableMap<String, String> parsePackageVersionCodes (String output)

"package:{key} versionCode:{value}" satırlarını bir haritaya ayrıştırır.

Parametreler
output String

İlerlemeler
ImmutableMap<String, String>

setupDevice

protected void setupDevice (ITestDevice device)

/system altına dosya göndermeden önce adb root ve remount device komutlarını kullanın

Parametreler
device ITestDevice

Dekoratif yastıklar
ModulePusher.ModulePushError Cihaz yeniden monte edilemiyorsa
DeviceNotAvailableException

waitForDeviceToBeResponsive

protected void waitForDeviceToBeResponsive (long waitTime)

Parametreler
waitTime long