Added in API level 36

Builder


class Builder
kotlin.Any
   ↳ android.adservices.ondevicepersonalization.ExecuteInIsolatedServiceRequest.Builder

A builder for ExecuteInIsolatedServiceRequest

Summary

Public constructors

Creates a new Builder.

Public methods
ExecuteInIsolatedServiceRequest

Builds the instance.

ExecuteInIsolatedServiceRequest.Builder

A PersistableBundle that is passed from the calling app to the IsolatedService.

ExecuteInIsolatedServiceRequest.Builder

The set of spec to indicate output of IsolatedService.

Public constructors

Builder

Added in API level 36
Builder(service: ComponentName)

Creates a new Builder.

Parameters
service ComponentName: The ComponentName of the IsolatedService. This value cannot be null.

Public methods

build

Added in API level 36
fun build(): ExecuteInIsolatedServiceRequest

Builds the instance.

Return
ExecuteInIsolatedServiceRequest This value cannot be null.

setAppParams

Added in API level 36
fun setAppParams(value: PersistableBundle): ExecuteInIsolatedServiceRequest.Builder

A PersistableBundle that is passed from the calling app to the IsolatedService. The expected contents of this parameter are defined by the IsolatedService. The platform does not interpret this parameter.

Parameters
value PersistableBundle: This value cannot be null.
Return
ExecuteInIsolatedServiceRequest.Builder This value cannot be null.

setOutputSpec

Added in API level 36
fun setOutputSpec(value: ExecuteInIsolatedServiceRequest.OutputSpec): ExecuteInIsolatedServiceRequest.Builder

The set of spec to indicate output of IsolatedService. It's mainly used by platform. If OutputSpec is set to OutputSpec.DEFAULT, OnDevicePersonalization will ignore result returned by IsolatedService. If OutputSpec is built with OutputSpec.buildBestValueSpec, OnDevicePersonalization will verify ExecuteOutput.getBestValue() returned by IsolatedService within the max value range set in OutputSpec.getMaxIntValue and add noise.

Parameters
value ExecuteInIsolatedServiceRequest.OutputSpec: This value cannot be null.
Return
ExecuteInIsolatedServiceRequest.Builder This value cannot be null.