ExecuteInIsolatedServiceRequest.OutputSpec
public
static
class
ExecuteInIsolatedServiceRequest.OutputSpec
extends Object
java.lang.Object | |
↳ | 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 buildBestValueSpec(int)
, OnDevicePersonalization will verify ExecuteOutput.getBestValue()
returned by IsolatedService
within the max value range
set in OutputSpec.getMaxIntValue
and add noise.
Summary
Constants | |
---|---|
int |
OUTPUT_TYPE_BEST_VALUE
If set, |
int |
OUTPUT_TYPE_NULL
The default value of OutputType. |
Fields | |
---|---|
public
static
final
ExecuteInIsolatedServiceRequest.OutputSpec |
DEFAULT
The default value of |
Public methods | |
---|---|
static
ExecuteInIsolatedServiceRequest.OutputSpec
|
buildBestValueSpec(int maxIntValue)
Creates the output spec to get best value out of |
int
|
getMaxIntValue()
Returns the value set in |
int
|
getOutputType()
Returns the output type of |
Inherited methods | |
---|---|
Constants
OUTPUT_TYPE_BEST_VALUE
public static final int OUTPUT_TYPE_BEST_VALUE
If set, ExecuteInIsolatedServiceResponse.getBestValue()
will return an integer
that indicates the index of best values passed in ExecuteInIsolatedServiceRequest.getAppParams()
.
Constant Value: 1 (0x00000001)
OUTPUT_TYPE_NULL
public static final int OUTPUT_TYPE_NULL
The default value of OutputType. If set, OnDevicePersonalization will ignore result
returned by IsolatedService
and ExecuteInIsolatedServiceResponse
doesn't
return any output data.
Constant Value: 0 (0x00000000)
Fields
DEFAULT
public static final ExecuteInIsolatedServiceRequest.OutputSpec DEFAULT
The default value of OutputSpec
.
Public methods
buildBestValueSpec
public static ExecuteInIsolatedServiceRequest.OutputSpec buildBestValueSpec (int maxIntValue)
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 |
Returns | |
---|---|
ExecuteInIsolatedServiceRequest.OutputSpec |
This value cannot be null . |
getMaxIntValue
public int getMaxIntValue ()
Returns the value set in OutputSpec.buildBestValueSpec
. The value is expected to
be ExecuteInIsolatedServiceResponse.DEFAULT_BEST_VALUE
if getOutputType()
is OutputSpec.OUTPUT_TYPE_NULL
.
Returns | |
---|---|
int |
Value is DEFAULT_BEST_VALUE or greater |
getOutputType
public int getOutputType ()
Returns the output type of IsolatedService
. The default value is OUTPUT_TYPE_NULL
.
Returns | |
---|---|
int |
Value is OUTPUT_TYPE_NULL , or OUTPUT_TYPE_BEST_VALUE |