Nicolo' Mazzucato d4e6ec0ea8 Fix onHandleAssist behaviour when showSession is called with flags = 0
The code to handle voice interaction sessions had two problems:

1. it was not handling correctly the case where
VoiceInteractionSessionConnection.showLocked was called before a session
started, without requiring any assist data (flags = 0).
Now, when the session is set in VoiceInteractionSessionConnection,
the pending `onHandleAssist` are called.

2. AssistState delivered with `onHandleAssist` had the wrong IBinder
inside ActivityId. it contained ActivityRecord.appToken, but to work
properly ActivityRecord.assistToken was required. Tests have been updated
to catch this (atest CtsVoiceInteractionTestCases).

Bug: 178020517
Test: atest CtsAssistTestCases
Test: atest CtsVoiceInteractionTestCases
Change-Id: Id10937f0655d6837ccb85250c369bdeccd261ed8
2021-03-23 17:22:49 +00:00

21 lines
364 B
Plaintext

{
"presubmit-large": [
{
"name": "CtsVoiceInteractionTestCases",
"options": [
{
"exclude-annotation": "androidx.test.filters.FlakyTest"
}
]
},
{
"name": "CtsAssistTestCases",
"options": [
{
"exclude-annotation": "androidx.test.filters.FlakyTest"
}
]
}
]
}