From 0ff358f0a8486aeb055dff360f4622b6b0e277e4 Mon Sep 17 00:00:00 2001 From: lpeter Date: Tue, 12 Oct 2021 15:00:25 +0800 Subject: [PATCH] Add java doc for registerVisibleActivityCallback method. Bug: 202102333 Test: manual test Change-Id: I01d709be9f79552370aa9bcde47c65a36a956a19 --- .../java/android/service/voice/VoiceInteractionSession.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/core/java/android/service/voice/VoiceInteractionSession.java b/core/java/android/service/voice/VoiceInteractionSession.java index 9db856a8762ab..4d0fc16428740 100644 --- a/core/java/android/service/voice/VoiceInteractionSession.java +++ b/core/java/android/service/voice/VoiceInteractionSession.java @@ -2045,7 +2045,11 @@ public class VoiceInteractionSession implements KeyEvent.Callback, ComponentCall /** * Registers a callback that will be notified when visible activities have been changed. * - * @param executor The handler to receive the callback. + * Note: The {@link VisibleActivityCallback#onVisible(VisibleActivityInfo)} will be called + * immediately with current visible activities when the callback is registered for the first + * time. If the callback is already registered, this method does nothing. + * + * @param executor The executor which will be used to invoke the callback. * @param callback The callback to receive the response. * * @throws IllegalStateException if calling this method before onCreate().