From 434fc2c524ef25d6e8dead04df5d319d637ae3a2 Mon Sep 17 00:00:00 2001 From: Tyler Gunn Date: Tue, 6 Oct 2020 14:23:54 -0700 Subject: [PATCH] Clarify API docs for getCannedTextResponses. The API docs do not clearly indicate the fact that canned text responses may not be available when a call is first added. Updating the API docs to clarify this and reference the listener a developer can use to be informed of changes to the canned responses. Test: Docs only change. Bug: 162843384 Change-Id: I52ced96439b2dfa31c1f2428979ab54466763afa --- telecomm/java/android/telecom/Call.java | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/telecomm/java/android/telecom/Call.java b/telecomm/java/android/telecom/Call.java index 0469fa56e6485..a6d72450156fb 100755 --- a/telecomm/java/android/telecom/Call.java +++ b/telecomm/java/android/telecom/Call.java @@ -2111,7 +2111,13 @@ public final class Call { /** * Obtains a list of canned, pre-configured message responses to present to the user as - * ways of rejecting this {@code Call} using via a text message. + * ways of rejecting an incoming {@code Call} using via a text message. + *

+ * Note: Since canned responses may be loaded from the file system, they are not + * guaranteed to be present when this {@link Call} is first added to the {@link InCallService} + * via {@link InCallService#onCallAdded(Call)}. The callback + * {@link Call.Callback#onCannedTextResponsesLoaded(Call, List)} will be called when/if canned + * responses for the call become available. * * @see #reject(boolean, String) *