@Implements(value=android.service.voice.VoiceInteractionSession.class, minSdk=21) public class ShadowVoiceInteractionSession extends Object
VoiceInteractionSession.| Constructor | Description |
|---|---|
ShadowVoiceInteractionSession() |
| Modifier and Type | Method | Description |
|---|---|---|
void |
create() |
Simulates the creation of the
VoiceInteractionSession, as if it was being created by
the framework. |
com.google.common.collect.ImmutableList<Intent> |
getAssistantActivityIntents() |
Returns the list of
Intent instances passed into VoiceInteractionSession.startAssistantActivity(Intent) in invocation order. |
Intent |
getLastAssistantActivityIntent() |
Returns the last
Intent passed into VoiceInteractionSession.startAssistantActivity(Intent) or null if there wasn't any. |
Intent |
getLastVoiceActivityIntent() |
Returns the last
Intent passed into VoiceInteractionSession.startVoiceActivity(Intent) or null if there wasn't any. |
com.google.common.collect.ImmutableList<Intent> |
getVoiceActivityIntents() |
Returns the list of
Intent instances passed into VoiceInteractionSession.startVoiceActivity(Intent) in invocation order. |
boolean |
isFinishing() |
Returns whether the
VoiceInteractionSession is in the process of being destroyed and
finishing. |
boolean |
isUiEnabled() |
Returns whether the UI is set to be enabled through
VoiceInteractionSession.setUiEnabled(boolean). |
boolean |
isWindowShowing() |
Returns whether the UI window from
VoiceInteractionSession is currently showing. |
void |
setStartVoiceActivityException(RuntimeException exception) |
Sets a
RuntimeException that should be thrown when VoiceInteractionSession.startVoiceActivity(Intent) is invoked. |
public void create()
VoiceInteractionSession, as if it was being created by
the framework.
This method must be called before state changing methods of VoiceInteractionSession.
@Nullable public Intent getLastAssistantActivityIntent()
Intent passed into VoiceInteractionSession.startAssistantActivity(Intent) or null if there wasn't any.public com.google.common.collect.ImmutableList<Intent> getAssistantActivityIntents()
Intent instances passed into VoiceInteractionSession.startAssistantActivity(Intent) in invocation order.@Nullable public Intent getLastVoiceActivityIntent()
Intent passed into VoiceInteractionSession.startVoiceActivity(Intent) or null if there wasn't any.public com.google.common.collect.ImmutableList<Intent> getVoiceActivityIntents()
Intent instances passed into VoiceInteractionSession.startVoiceActivity(Intent) in invocation order.public boolean isWindowShowing()
VoiceInteractionSession is currently showing.public boolean isUiEnabled()
VoiceInteractionSession.setUiEnabled(boolean).public boolean isFinishing()
VoiceInteractionSession is in the process of being destroyed and
finishing.public void setStartVoiceActivityException(RuntimeException exception)
RuntimeException that should be thrown when VoiceInteractionSession.startVoiceActivity(Intent) is invoked.