AssistantQueryRequest
public
final
class
AssistantQueryRequest
extends EgressRequest<AssistantQueryResponse>
implements
Parcelable
| java.lang.Object | ||
| ↳ | android.app.privatecompute.EgressRequest<android.app.privatecompute.AssistantQueryResponse> | |
| ↳ | android.app.privatecompute.AssistantQueryRequest | |
Request object specifically for Assistant Query Egress operations. Binds this request to the
AssistantQueryResponse type.
These requests are subject to system validations, rate limits, and user consent. If the
non-PCC process does not return the response in a reasonable timeframe, the platform will unbind
from the non-PCC process and return
PccEgressException.ERROR_NO_RESPONSE_FROM_EGRESS_SERVICE via the callback.
A request is considered invalid and will cause PccSandboxManager.egressData to throw
IllegalArgumentException synchronously if:
- The request or its
Querypayload is null. - The
Query.getSessionId()orQuery.getQueryString()is null. - The session ID has already been used (reused/replayed).
- The query string size exceeds the maximum allowed limit (10 KB).
- The calling package does not contain the user-chosen default Assistant.
A request will cause PccSandboxManager.egressData to throw
IllegalStateException synchronously if:
- The user has not consented to egress for the Assistant service.
- The egress rate limit has been exceeded. The system enforces two limits:
- A maximum of 100 successful egress calls in a rolling 24-hour window.
- A maximum of 200 total egress attempts in a rolling 24-hour window.
Summary
Nested classes | |
|---|---|
class |
AssistantQueryRequest.Builder
Builder for |
class |
AssistantQueryRequest.Query
Payload containing the raw query details to be routed to the non-PCC assistant process. |
Inherited constants |
|---|
Fields | |
|---|---|
public
static
final
Creator<AssistantQueryRequest> |
CREATOR
Creator for |
Inherited fields |
|---|
Public methods | |
|---|---|
int
|
describeContents()
Describe the kinds of special objects contained in this Parcelable instance's marshaled representation. |
AssistantQueryRequest.Query
|
getQuery()
Returns the query payload associated with this request. |
void
|
writeToParcel(Parcel dest, int flags)
Flatten this object in to a Parcel. |
Inherited methods | |
|---|---|
Fields
CREATOR
public static final Creator<AssistantQueryRequest> CREATOR
Creator for AssistantQueryRequest instance.
Public methods
describeContents
public int describeContents ()
Describe the kinds of special objects contained in this Parcelable
instance's marshaled representation. For example, if the object will
include a file descriptor in the output of writeToParcel(Parcel,int),
the return value of this method must include the
CONTENTS_FILE_DESCRIPTOR bit.
| Returns | |
|---|---|
int |
a bitmask indicating the set of special object types marshaled
by this Parcelable object instance.
Value is either 0 or
|
getQuery
public AssistantQueryRequest.Query getQuery ()
Returns the query payload associated with this request.
| Returns | |
|---|---|
AssistantQueryRequest.Query |
The Query payload.
This value cannot be null. |
writeToParcel
public void writeToParcel (Parcel dest, int flags)
Flatten this object in to a Parcel.
| Parameters | |
|---|---|
dest |
Parcel: This value cannot be null. |
flags |
int: Additional flags about how the object should be written.
May be 0 or Parcelable.PARCELABLE_WRITE_RETURN_VALUE.
Value is either 0 or a combination of the following:
|
Content and code samples on this page are subject to the licenses described in the Content License. Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.
Last updated 2026-08-14 UTC.