OutputSpec
open class OutputSpec
| kotlin.Any | |
| ↳ | android.adservices.ondevicepersonalization.ExecuteInIsolatedServiceRequest.OutputSpec |
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 android.adservices.ondevicepersonalization.ExecuteInIsolatedServiceRequest.OutputSpec#buildBestValueSpec, OnDevicePersonalization will verify android.adservices.ondevicepersonalization.ExecuteOutput#getBestValue() returned by IsolatedService within the max value range set in OutputSpec.getMaxIntValue and add noise.
Summary
| Constants | |
|---|---|
| static Int |
If set, |
| static Int |
The default value of OutputType. |
| Public methods | |
|---|---|
| open static ExecuteInIsolatedServiceRequest.OutputSpec |
buildBestValueSpec(maxIntValue: Int)Creates the output spec to get best value out of |
| open Int |
Returns the value set in |
| open Int |
Returns the output type of |
| Properties | |
|---|---|
| static ExecuteInIsolatedServiceRequest.OutputSpec |
The default value of |
Constants
OUTPUT_TYPE_BEST_VALUE
static val OUTPUT_TYPE_BEST_VALUE: Int
If set, ExecuteInIsolatedServiceResponse.getBestValue() will return an integer that indicates the index of best values passed in android.adservices.ondevicepersonalization.ExecuteInIsolatedServiceRequest#getAppParams.
Value: 1OUTPUT_TYPE_NULL
static val OUTPUT_TYPE_NULL: Int
The default value of OutputType. If set, OnDevicePersonalization will ignore result returned by IsolatedService and ExecuteInIsolatedServiceResponse doesn't return any output data.
Value: 0Public methods
buildBestValueSpec
open static fun buildBestValueSpec(maxIntValue: Int): ExecuteInIsolatedServiceRequest.OutputSpec
Creates the output spec to get best value out of maxIntValue. If set this, caller can call ExecuteInIsolatedServiceResponse.getBestValue to get result.
| Parameters | |
|---|---|
maxIntValue |
Int: the maximum value IsolatedWorker can return to caller app. Value is 0 or greater |
| Return | |
|---|---|
ExecuteInIsolatedServiceRequest.OutputSpec |
This value cannot be null. |
getMaxIntValue
open fun getMaxIntValue(): Int
Returns the value set in OutputSpec.buildBestValueSpec. The value is expected to be ExecuteInIsolatedServiceResponse.DEFAULT_BEST_VALUE if getOutputType is OutputSpec.OUTPUT_TYPE_NULL.
| Return | |
|---|---|
Int |
Value is android.adservices.ondevicepersonalization.ExecuteInIsolatedServiceResponse#DEFAULT_BEST_VALUE or greater |
getOutputType
open fun getOutputType(): Int
Returns the output type of IsolatedService. The default value is android.adservices.ondevicepersonalization.ExecuteInIsolatedServiceRequest.OutputSpec#OUTPUT_TYPE_NULL.
Properties
DEFAULT
static val DEFAULT: ExecuteInIsolatedServiceRequest.OutputSpec
The default value of OutputSpec.