Nested classes |
class |
ModulePusher.ModulePushError
Fatal error during Mainline module push.
|
Public methods |
void
|
installModules(ImmutableMultimap<String, File> moduleFiles, boolean factoryReset, boolean disablePackageCache)
Installs moduleFiles to the device by adb push.
|
Fields
LINE_BREAK
public static final String LINE_BREAK
Public constructors
ModulePusher
public ModulePusher (ITestDevice device,
long waitTimeMs,
long delayWaitingTimeMs)
Parameters |
device |
ITestDevice |
waitTimeMs |
long |
delayWaitingTimeMs |
long |
Public methods
installModules
public void installModules (ImmutableMultimap<String, File> moduleFiles,
boolean factoryReset,
boolean disablePackageCache)
Installs moduleFiles
to the device by adb push.
Parameters |
moduleFiles |
ImmutableMultimap : a multimap from package names to the package files. In split case, the
base package should be the first in iteration order. |
factoryReset |
boolean : if reload via factory reset. |
disablePackageCache |
boolean |
Protected methods
checkApexActivated
protected void checkApexActivated (ITestDevice device,
modules)
Check if all apexes are activated.
Parameters |
device |
ITestDevice : under test. |
modules |
|
getApexPathUnderSystem
protected Path getApexPathUnderSystem (ITestDevice device,
String packageName)
Parameters |
device |
ITestDevice |
packageName |
String |
getModulesFailToActivate
protected getModulesFailToActivate ( toInstall,
activatedApexes)
Get modules that failed to be activated.
Parameters |
toInstall |
|
activatedApexes |
: The set of the active apexes on device |
Returns |
|
a list containing the apexinfo of the input apex modules that failed to be activated. |
getPathsOnDevice
protected String[] getPathsOnDevice (ITestDevice device,
String packageName)
Get the paths of the installation files of the package on the device.
Parameters |
device |
ITestDevice : under test |
packageName |
String : of the module |
Returns |
String[] |
paths of all files of the package |
getPreloadPaths
protected Path[] getPreloadPaths (ITestDevice device,
File[] moduleFiles,
String packageName,
int apiLevel)
Get the paths of the preload package on the device.
For split packages, return the path of the package dir followed by the paths of files. As
a result, the size of return is always > 1 in this case. For non-split packages, simply
return the path of the preload installation file.
Parameters |
device |
ITestDevice : under test |
moduleFiles |
File : local modules files to install |
packageName |
String : of the module |
apiLevel |
int : of the device |
Returns |
Path[] |
the paths of the preload files. |
parsePackageVersionCodes
protected ImmutableMap<String, String> parsePackageVersionCodes (String output)
Parses lines of "package:{key} versionCode:{value}" into a map.
Returns |
ImmutableMap<String, String> |
|
setupDevice
protected void setupDevice (ITestDevice device)
adb root and remount device before push files under /system
Parameters |
device |
ITestDevice |
waitForDeviceToBeResponsive
protected void waitForDeviceToBeResponsive (long waitTime)
Content and code samples on this page are subject to the licenses described in the Content License. Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.
Last updated 2023-03-08 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2023-03-08 UTC."],[],[]]