AgentTaskUpdate


public final class AgentTaskUpdate
extends Object implements Parcelable

java.lang.Object
   ↳ android.agenticon.AgentTaskUpdate


Data to request a change in the UI for Agent Task space in the status bar.

  • If getAgentTaskState() is non null, this will become the current state and its icon will be shown (when there are no events to show) until the next request for state is placed. If this is null, the last sent state will be maintained.
  • If getAgentTaskEvent() is non null, the text will be shown for a short period of time. It is possible that in some circumstances, the text cannot be shown.
  • If neither getAgentTaskState() or getAgentTaskEvent() are null, the text in getAgentTaskEvent() will be shown if possible, and the state will be set to getAgentTaskState(). Setting them together will guarantee that after the AgentTaskEvent, the state will be set to the correct value.
  • If both elements are null, no changes will be applied.

Summary

Nested classes

class AgentTaskUpdate.Builder

Builder for AgentTaskUpdate

Inherited constants

Fields

public static final Creator<AgentTaskUpdate> CREATOR

Public methods

int describeContents()

Describe the kinds of special objects contained in this Parcelable instance's marshaled representation.

AgentTaskEvent getAgentTaskEvent()

An event to show in the status bar for a short period of time.

AgentTaskState getAgentTaskState()

The next state to show in the status bar space.

void writeToParcel(Parcel dest, int flags)

Flatten this object in to a Parcel.

Inherited methods

Fields

CREATOR

Added in version 37.2
public static final Creator<AgentTaskUpdate> CREATOR

Public methods

describeContents

Added in version 37.2
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

getAgentTaskEvent

Added in version 37.2
public AgentTaskEvent getAgentTaskEvent ()

An event to show in the status bar for a short period of time. If null, no event will be shown.

Returns
AgentTaskEvent

getAgentTaskState

Added in version 37.2
public AgentTaskState getAgentTaskState ()

The next state to show in the status bar space. If null, the last state will be maintained.

Returns
AgentTaskState

writeToParcel

Added in version 37.2
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: