Skip to content
Commit bbc1459c authored by Nicolo' Mazzucato's avatar Nicolo' Mazzucato
Browse files

Always call onHandleAssist with AssistState containing at least activity id

With this change, even if clients are not requesting any assist
data (e.g. VoiceInteractionSession.showSession is called with 0
as flags), Activity's `onHandleAssist(AssistState)` is always
called with non-null ActivityId. If no other data were requested,
AssistContent, AssistData and AssistStructure inside
VoiceInteractionSession.AssistState are null.

The previous behaviour was that if no assistData were requested,
Activity's `onHandleAssist` would not have been called.

This new behaviour saves time to clients interested only in ActivityIds,
because no activities methods need to be called (to get AssistData and
AssistContent).

We are not adding a new flag "SHOW_WITH_ACTIVITY_ID" because this
ActivityId is always non-null in ActivityState, and it's cheap to get it.

Bug: 178020517
Test: atest CtsAssistTestCases
Test: atest CtsVoiceInteractionTestCases
Change-Id: Icb46a928c8508a4bd355622df78f9371c21fd0e6
parent 24923769
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment