diff options
| author | Charles Chen <charlesccchen@google.com> | 2019-09-17 21:02:07 +0800 |
|---|---|---|
| committer | Charles Chen <charlesccchen@google.com> | 2019-09-17 21:02:07 +0800 |
| commit | eba0a20afb31d39947e7affb455ee002ccf83430 (patch) | |
| tree | 716ce74f84b89ed7b8668aed27b03436491729c6 /core/java/android/app/Activity.java | |
| parent | 2aed1f376d0450d476bd3f40152c8a13816567d2 (diff) | |
Mention singleTask case in Activity#isVoiceInteractionRoot
Test: build & presubmit
fixes: 140532140
Change-Id: I486fd3c8b2b47b733763675d0206c9730dd04cac
Diffstat (limited to 'core/java/android/app/Activity.java')
| -rw-r--r-- | core/java/android/app/Activity.java | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/core/java/android/app/Activity.java b/core/java/android/app/Activity.java index 15c642571bc6..4b9700ca7f41 100644 --- a/core/java/android/app/Activity.java +++ b/core/java/android/app/Activity.java @@ -1920,11 +1920,15 @@ public class Activity extends ContextThemeWrapper } /** - * Like {@link #isVoiceInteraction}, but only returns true if this is also the root - * of a voice interaction. That is, returns true if this activity was directly + * Like {@link #isVoiceInteraction}, but only returns {@code true} if this is also the root + * of a voice interaction. That is, returns {@code true} if this activity was directly * started by the voice interaction service as the initiation of a voice interaction. * Otherwise, for example if it was started by another activity while under voice - * interaction, returns false. + * interaction, returns {@code false}. + * If the activity {@link android.R.styleable#AndroidManifestActivity_launchMode launchMode} is + * {@code singleTask}, it forces the activity to launch in a new task, separate from the one + * that started it. Therefore, there is no longer a relationship between them, and + * {@link #isVoiceInteractionRoot()} return {@code false} in this case. */ public boolean isVoiceInteractionRoot() { try { |
