TestCustomAudienceManager
  public
  
  
  
  class
  TestCustomAudienceManager
  
    extends Object
  
  
  
  
  
  
| java.lang.Object | |
| ↳ | android.adservices.customaudience.TestCustomAudienceManager | 
TestCustomAudienceManager provides APIs for app and ad-SDKs to test custom audiences.
Summary
| Public methods | |
|---|---|
| 
        
        
        
        
        
        void | 
      overrideCustomAudienceRemoteInfo(AddCustomAudienceOverrideRequest request, Executor executor, OutcomeReceiver<Object, Exception> receiver)
      Overrides the Custom Audience API to avoid fetching data from remote servers and use the data
 provided in  | 
| 
        
        
        
        
        
        void | 
      removeCustomAudienceRemoteInfoOverride(RemoveCustomAudienceOverrideRequest request, Executor executor, OutcomeReceiver<Object, Exception> receiver)
      Removes an override in th Custom Audience API with associated the data in  | 
| 
        
        
        
        
        
        void | 
      resetAllCustomAudienceOverrides(Executor executor, OutcomeReceiver<Object, Exception> receiver)
      Removes all override data in the Custom Audience API. | 
| Inherited methods | |
|---|---|
Public methods
overrideCustomAudienceRemoteInfo
public void overrideCustomAudienceRemoteInfo (AddCustomAudienceOverrideRequest request, Executor executor, OutcomeReceiver<Object, Exception> receiver)
Overrides the Custom Audience API to avoid fetching data from remote servers and use the data
 provided in AddCustomAudienceOverrideRequest instead. The AddCustomAudienceOverrideRequest is provided by the Ads SDK.
 
This method is intended to be used for end-to-end testing. This API is enabled only for apps in debug mode with developer options enabled.
This call will fail silently if the owner in the request is not the
 calling app's package name.
 
 Requires AdServicesPermissions.ACCESS_ADSERVICES_CUSTOM_AUDIENCE
| Parameters | |
|---|---|
| request | AddCustomAudienceOverrideRequest: This value cannot benull. | 
| executor | Executor: This value cannot benull.
 
 Callback and listener events are dispatched through thisExecutor, providing an easy way to control which thread is
 used. To dispatch events through the main thread of your
 application, you can useContext.getMainExecutor().
 Otherwise, provide anExecutorthat dispatches to an appropriate thread. | 
| receiver | OutcomeReceiver: This value cannot benull. | 
| Throws | |
|---|---|
| IllegalStateException | if this API is not enabled for the caller The receiver either returns a  | 
removeCustomAudienceRemoteInfoOverride
public void removeCustomAudienceRemoteInfoOverride (RemoveCustomAudienceOverrideRequest request, Executor executor, OutcomeReceiver<Object, Exception> receiver)
Removes an override in th Custom Audience API with associated the data in RemoveCustomAudienceOverrideRequest.
 
This method is intended to be used for end-to-end testing. This API is enabled only for
 apps in debug mode with developer options enabled.
 
 Requires AdServicesPermissions.ACCESS_ADSERVICES_CUSTOM_AUDIENCE
| Parameters | |
|---|---|
| request | RemoveCustomAudienceOverrideRequest: This value cannot benull. | 
| executor | Executor: This value cannot benull.
 
 Callback and listener events are dispatched through thisExecutor, providing an easy way to control which thread is
 used. To dispatch events through the main thread of your
 application, you can useContext.getMainExecutor().
 Otherwise, provide anExecutorthat dispatches to an appropriate thread. | 
| receiver | OutcomeReceiver: This value cannot benull. | 
| Throws | |
|---|---|
| IllegalStateException | if this API is not enabled for the caller The  | 
resetAllCustomAudienceOverrides
public void resetAllCustomAudienceOverrides (Executor executor, OutcomeReceiver<Object, Exception> receiver)
Removes all override data in the Custom Audience API.
This method is intended to be used for end-to-end testing. This API is enabled only for
 apps in debug mode with developer options enabled.
 
 Requires AdServicesPermissions.ACCESS_ADSERVICES_CUSTOM_AUDIENCE
| Parameters | |
|---|---|
| executor | Executor: This value cannot benull.
 
 Callback and listener events are dispatched through thisExecutor, providing an easy way to control which thread is
 used. To dispatch events through the main thread of your
 application, you can useContext.getMainExecutor().
 Otherwise, provide anExecutorthat dispatches to an appropriate thread. | 
| receiver | OutcomeReceiver: This value cannot benull. | 
| Throws | |
|---|---|
| IllegalStateException | if this API is not enabled for the caller The receiver either returns a  | 
