ExecuteInIsolatedServiceResponse


public class ExecuteInIsolatedServiceResponse
extends Object

java.lang.Object
   ↳ android.adservices.ondevicepersonalization.ExecuteInIsolatedServiceResponse


The response of OnDevicePersonalizationManager.executeInIsolatedService.

Summary

Constants

int DEFAULT_BEST_VALUE

The default value of ExecuteInIsolatedServiceResponse.getBestValue if IsolatedService didn't return any content.

Public constructors

ExecuteInIsolatedServiceResponse(SurfacePackageToken surfacePackageToken, int bestValue)

Creates a new ExecuteInIsolatedServiceResponse.

Public methods

int getBestValue()

Returns the int value that was returned by the IsolatedService and applied noise.

SurfacePackageToken getSurfacePackageToken()

Returns a SurfacePackageToken, which is an opaque reference to content that can be displayed in a SurfaceView.

Inherited methods

Object clone()

Creates and returns a copy of this object.

boolean equals(Object obj)

Indicates whether some other object is "equal to" this one.

void finalize()

Called by the garbage collector on an object when garbage collection determines that there are no more references to the object.

final Class<?> getClass()

Returns the runtime class of this Object.

int hashCode()

Returns a hash code value for the object.

final void notify()

Wakes up a single thread that is waiting on this object's monitor.

final void notifyAll()

Wakes up all threads that are waiting on this object's monitor.

String toString()

Returns a string representation of the object.

final void wait(long timeoutMillis, int nanos)

Causes the current thread to wait until it is awakened, typically by being notified or interrupted, or until a certain amount of real time has elapsed.

final void wait(long timeoutMillis)

Causes the current thread to wait until it is awakened, typically by being notified or interrupted, or until a certain amount of real time has elapsed.

final void wait()

Causes the current thread to wait until it is awakened, typically by being notified or interrupted.

Constants

DEFAULT_BEST_VALUE

public static final int DEFAULT_BEST_VALUE

The default value of ExecuteInIsolatedServiceResponse.getBestValue if IsolatedService didn't return any content.

Constant Value: -1 (0xffffffff)

Public constructors

ExecuteInIsolatedServiceResponse

public ExecuteInIsolatedServiceResponse (SurfacePackageToken surfacePackageToken, 
                int bestValue)

Creates a new ExecuteInIsolatedServiceResponse.

Parameters
surfacePackageToken SurfacePackageToken: an opaque reference to content that can be displayed in a SurfaceView. This may be null if the IsolatedService has not generated any content to be displayed within the calling app.

bestValue int: an int value that was returned by the IsolatedService and applied noise.If ExecuteInIsolatedServiceRequest output type is set to 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 ExecuteInIsolatedServiceRequest.OutputSpec.OUTPUT_TYPE_BEST_VALUE, the platform validates ExecuteOutput.getBestValue between 0 and ExecuteInIsolatedServiceRequest.OutputSpec.getMaxIntValue() and applies noise to result. Value is DEFAULT_BEST_VALUE or greater

Public methods

getBestValue

public int getBestValue ()

Returns the int value that was returned by the IsolatedService and applied noise. If ExecuteInIsolatedServiceRequest output type is set to 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 ExecuteInIsolatedServiceRequest.OutputSpec.OUTPUT_TYPE_BEST_VALUE, the platform validates ExecuteOutput.getBestValue between 0 and ExecuteInIsolatedServiceRequest.OutputSpec.getMaxIntValue() and applies noise to result.

Returns
int Value is DEFAULT_BEST_VALUE or greater

getSurfacePackageToken

public SurfacePackageToken getSurfacePackageToken ()

Returns a SurfacePackageToken, which is an opaque reference to content that can be displayed in a SurfaceView. This may be null if the IsolatedService has not generated any content to be displayed within the calling app.