ExecuteInIsolatedServiceResponse
open class ExecuteInIsolatedServiceResponse
| kotlin.Any | |
| ↳ | android.adservices.ondevicepersonalization.ExecuteInIsolatedServiceResponse |
The response of OnDevicePersonalizationManager.executeInIsolatedService.
Summary
| Constants | |
|---|---|
| static Int |
The default value of |
| Public constructors | |
|---|---|
ExecuteInIsolatedServiceResponse(surfacePackageToken: SurfacePackageToken?, bestValue: Int)Creates a new ExecuteInIsolatedServiceResponse. |
|
| Public methods | |
|---|---|
| open Int |
Returns the int value that was returned by the |
| open SurfacePackageToken? |
Returns a |
Constants
DEFAULT_BEST_VALUE
static val DEFAULT_BEST_VALUE: Int
The default value of ExecuteInIsolatedServiceResponse.getBestValue if IsolatedService didn't return any content.
Value: -1Public constructors
ExecuteInIsolatedServiceResponse
ExecuteInIsolatedServiceResponse(
surfacePackageToken: SurfacePackageToken?,
bestValue: Int)
Creates a new ExecuteInIsolatedServiceResponse.
Public methods
getBestValue
open fun getBestValue(): Int
Returns the int value that was returned by the IsolatedService and applied noise. If ExecuteInIsolatedServiceRequest output type is set to android.adservices.ondevicepersonalization.ExecuteInIsolatedServiceRequest.OutputSpec#OUTPUT_TYPE_NULL, the platform ignores the data returned by IsolatedService and returns the default value DEFAULT_BEST_VALUE. If ExecuteInIsolatedServiceRequest output type is set to android.adservices.ondevicepersonalization.ExecuteInIsolatedServiceRequest.OutputSpec#OUTPUT_TYPE_BEST_VALUE, the platform validates ExecuteOutput.getBestValue between 0 and android.adservices.ondevicepersonalization.ExecuteInIsolatedServiceRequest.OutputSpec#getMaxIntValue() and applies noise to result.
| Return | |
|---|---|
Int |
Value is android.adservices.ondevicepersonalization.ExecuteInIsolatedServiceResponse#DEFAULT_BEST_VALUE or greater |
getSurfacePackageToken
open fun getSurfacePackageToken(): SurfacePackageToken?
Returns a SurfacePackageToken, which is an opaque reference to content that can be displayed in a android.view.SurfaceView. This may be null if the IsolatedService has not generated any content to be displayed within the calling app.