Add NonNull annotation to getTextDirectionHeuristics
Test: None
Bug: 126700617
Change-Id: Idaf5cc0237cd82c5d317a66d9e22fe7d2ac41f3d
diff --git a/api/current.txt b/api/current.txt
index 276871a..84dd795 100644
--- a/api/current.txt
+++ b/api/current.txt
@@ -57332,7 +57332,7 @@
method @NonNull public android.view.textclassifier.TextClassifier getTextClassifier();
method public final android.content.res.ColorStateList getTextColors();
method @Nullable public android.graphics.drawable.Drawable getTextCursorDrawable();
- method public android.text.TextDirectionHeuristic getTextDirectionHeuristic();
+ method @NonNull public android.text.TextDirectionHeuristic getTextDirectionHeuristic();
method @NonNull public java.util.Locale getTextLocale();
method @NonNull @Size(min=1) public android.os.LocaleList getTextLocales();
method @NonNull public android.text.PrecomputedText.Params getTextMetricsParams();
diff --git a/core/java/android/widget/TextView.java b/core/java/android/widget/TextView.java
index 73792b0..04bcb14 100644
--- a/core/java/android/widget/TextView.java
+++ b/core/java/android/widget/TextView.java
@@ -12744,7 +12744,7 @@
* return value may not be the same as the one TextView uses if the View's layout direction is
* not resolved or detached from parent root view.
*/
- public TextDirectionHeuristic getTextDirectionHeuristic() {
+ public @NonNull TextDirectionHeuristic getTextDirectionHeuristic() {
if (hasPasswordTransformationMethod()) {
// passwords fields should be LTR
return TextDirectionHeuristics.LTR;