From 863a9ad90b92c42f36fa29a93bead6a190eaf203 Mon Sep 17 00:00:00 2001 From: Joanne Chung Date: Wed, 2 Sep 2020 12:34:52 +0800 Subject: [PATCH] Update AssistStructure.ViewNode#getMaxTextLength() javadoc. Since S, we limit characters for single line TextView due to the performance reason(459f35a). The return value for not set case is not -1. Update the API javadoc to prevent giving wrong information. Bug: 159037010 Test: n/a Change-Id: Ic5aa93083f48fa50e097579e61320cc13897265f --- core/java/android/app/assist/AssistStructure.java | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/core/java/android/app/assist/AssistStructure.java b/core/java/android/app/assist/AssistStructure.java index 22d8c87e92683..b5234f8e2e17a 100644 --- a/core/java/android/app/assist/AssistStructure.java +++ b/core/java/android/app/assist/AssistStructure.java @@ -36,8 +36,6 @@ import android.view.WindowManagerGlobal; import android.view.autofill.AutofillId; import android.view.autofill.AutofillValue; -import com.android.internal.util.Preconditions; - import java.util.ArrayList; import java.util.Arrays; import java.util.List; @@ -1676,8 +1674,9 @@ public class AssistStructure implements Parcelable { } /** - * Returns the maximum length of the text associated with this node node, or {@code -1} - * if not supported by the node or not set. + * Returns the maximum length of the text associated with this node, or {@code -1} if not + * supported by the node or not set. System may set a default value if the text length is + * not set. * *

It's only relevant when the {@link AssistStructure} is used for autofill purposes, * not for assist purposes.