IncrementalInstallSession.Builder
public
static
class
IncrementalInstallSession.Builder
extends Object
| java.lang.Object | |
| ↳ | com.android.incfs.install.IncrementalInstallSession.Builder |
Summary
Public constructors | |
|---|---|
Builder()
|
|
Public methods | |
|---|---|
IncrementalInstallSession.Builder
|
addApk(Path apk, Path signature)
Adds an APK to set of APKs to be installed. |
IncrementalInstallSession.Builder
|
addExtraArgs(String... extraArgs)
Adds extra arguments to pass to the installation. |
IncrementalInstallSession
|
build()
Builds and starts the streaming install session. |
IncrementalInstallSession.Builder
|
setAllowReinstall(boolean reinstall)
Sets whether re-install of an app should be performed. |
IncrementalInstallSession.Builder
|
setBlockFilter(IBlockFilter filter)
Sets the callback used to determine whether a block of data that must be delivered to the device should be sent to the device. |
IncrementalInstallSession.Builder
|
setBlockTransformer(IBlockTransformer transformer)
Sets the callback used to transform the block of data before sending. |
IncrementalInstallSession.Builder
|
setLogger(ILogger logger)
Sets the logger interface used to log errors, warnings, and information regarding the incremental install session. |
IncrementalInstallSession.Builder
|
setResponseTimeout(long timeout, TimeUnit maxTimeUnits)
Sets the maximum amount of time during which no response from the device is allowed when
invoking |
Public constructors
Builder
public Builder ()
Public methods
addApk
public IncrementalInstallSession.Builder addApk (Path apk, Path signature)
Adds an APK to set of APKs to be installed. The app must be signed with APK Signature Scheme v4.
| Parameters | |
|---|---|
apk |
Path: the apk to install |
signature |
Path: the v4 signature of the apk |
| Returns | |
|---|---|
IncrementalInstallSession.Builder |
|
addExtraArgs
public IncrementalInstallSession.Builder addExtraArgs (String... extraArgs)
Adds extra arguments to pass to the installation. See 'adb shell pm install --help' for available options.
| Parameters | |
|---|---|
extraArgs |
String: the extra arguments to pass to the installation |
| Returns | |
|---|---|
IncrementalInstallSession.Builder |
|
build
public IncrementalInstallSession build ()
Builds and starts the streaming install session.
| Returns | |
|---|---|
IncrementalInstallSession |
|
| Throws | |
|---|---|
|
if the apk or signature file are not able to be read or are invalid. |
setAllowReinstall
public IncrementalInstallSession.Builder setAllowReinstall (boolean reinstall)
Sets whether re-install of an app should be performed.
| Parameters | |
|---|---|
reinstall |
boolean: whether re-install of an app should be performed |
| Returns | |
|---|---|
IncrementalInstallSession.Builder |
|
setBlockFilter
public IncrementalInstallSession.Builder setBlockFilter (IBlockFilter filter)
Sets the callback used to determine whether a block of data that must be delivered to the device should be sent to the device.
| Parameters | |
|---|---|
filter |
IBlockFilter: the callback |
| Returns | |
|---|---|
IncrementalInstallSession.Builder |
|
setBlockTransformer
public IncrementalInstallSession.Builder setBlockTransformer (IBlockTransformer transformer)
Sets the callback used to transform the block of data before sending.
| Parameters | |
|---|---|
transformer |
IBlockTransformer: the callback |
| Returns | |
|---|---|
IncrementalInstallSession.Builder |
|
setLogger
public IncrementalInstallSession.Builder setLogger (ILogger logger)
Sets the logger interface used to log errors, warnings, and information regarding the incremental install session.
| Parameters | |
|---|---|
logger |
ILogger: the callback |
| Returns | |
|---|---|
IncrementalInstallSession.Builder |
|
setResponseTimeout
public IncrementalInstallSession.Builder setResponseTimeout (long timeout, TimeUnit maxTimeUnits)
Sets the maximum amount of time during which no response from the device is allowed when
invoking IncrementalInstallSession.waitForInstallCompleted(long, TimeUnit) and IncrementalInstallSession.waitForServingCompleted(long, TimeUnit).
| Parameters | |
|---|---|
timeout |
long: the maximum amount of time during which no response from the device is
allowed. A value of 0 allows the specified methods to wait indefinitely for the next
response from the device |
maxTimeUnits |
TimeUnit: units for non-zero timeout |
| Returns | |
|---|---|
IncrementalInstallSession.Builder |
|