diff options
| author | Siyamed Sinir <siyamed@google.com> | 2018-11-27 15:12:03 -0800 |
|---|---|---|
| committer | Siyamed Sinir <siyamed@google.com> | 2018-11-27 17:59:18 -0800 |
| commit | a1e851c873e1006089ace2e671993d691af3aae5 (patch) | |
| tree | 2be7124b4bf48173ae4000a0c0e452610d67926e /core/java/android/widget/TextView.java | |
| parent | 18b665d4cd40155e0008d699503d07ef892fcd00 (diff) | |
Make TextView.getTextDirectionHeuristic public
Test: Added new CTS tests under cts.TextViewTest
Test: atest CtsWidgetTestCases:android.widget.cts.TextViewTest
Bug: 117521460
Change-Id: I27391f69f2387cc761a7fc859423bd921601bea9
Diffstat (limited to 'core/java/android/widget/TextView.java')
| -rw-r--r-- | core/java/android/widget/TextView.java | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/core/java/android/widget/TextView.java b/core/java/android/widget/TextView.java index 4ed9924f0d51..85d851a3116c 100644 --- a/core/java/android/widget/TextView.java +++ b/core/java/android/widget/TextView.java @@ -12268,13 +12268,13 @@ public class TextView extends View implements ViewTreeObserver.OnPreDrawListener } /** - * Returns the current {@link TextDirectionHeuristic}. - * - * @return the current {@link TextDirectionHeuristic}. - * @hide + * Returns resolved {@link TextDirectionHeuristic} that will be used for text layout. + * The {@link TextDirectionHeuristic} that is used by TextView is only available after + * {@link #getTextDirection()} and {@link #getLayoutDirection()} is resolved. Therefore the + * 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. */ - @UnsupportedAppUsage - protected TextDirectionHeuristic getTextDirectionHeuristic() { + public TextDirectionHeuristic getTextDirectionHeuristic() { if (hasPasswordTransformationMethod()) { // passwords fields should be LTR return TextDirectionHeuristics.LTR; |
