ExecuteInIsolatedServiceRequest.Builder


public static final class ExecuteInIsolatedServiceRequest.Builder
extends Object

java.lang.Object
   ↳ android.adservices.ondevicepersonalization.ExecuteInIsolatedServiceRequest.Builder


A builder for ExecuteInIsolatedServiceRequest

Summary

Public constructors

Builder(ComponentName service)

Creates a new Builder.

Public methods

ExecuteInIsolatedServiceRequest build()

Builds the instance.

ExecuteInIsolatedServiceRequest.Builder setAppParams(PersistableBundle value)

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

ExecuteInIsolatedServiceRequest.Builder setOutputSpec(ExecuteInIsolatedServiceRequest.OutputSpec value)

The set of spec to indicate output of IsolatedService.

Inherited methods

Public constructors

Builder

public Builder (ComponentName service)

Creates a new Builder.

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

Public methods

build

public ExecuteInIsolatedServiceRequest build ()

Builds the instance.

Returns
ExecuteInIsolatedServiceRequest This value cannot be null.

setAppParams

public ExecuteInIsolatedServiceRequest.Builder setAppParams (PersistableBundle value)

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.

Returns
ExecuteInIsolatedServiceRequest.Builder This value cannot be null.

setOutputSpec

public ExecuteInIsolatedServiceRequest.Builder setOutputSpec (ExecuteInIsolatedServiceRequest.OutputSpec value)

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.

Returns
ExecuteInIsolatedServiceRequest.Builder This value cannot be null.