From f51da99ac179cfa35f89c26245440dc2a85f60e3 Mon Sep 17 00:00:00 2001 From: Joanne Chung Date: Tue, 23 Mar 2021 23:46:17 +0800 Subject: Implement dispatchRequestTranslation for getting translation information. This change doesn't contain the virtual view part and the API, it will be done in the next change. Bug: 178046780 Test: manual Test: atest CtsTranslationTestCases CTS-Coverage-Bug: 177960696 Change-Id: Idba66a882a90168ecdd93423c0d5d054ab040dad --- core/java/android/widget/TextView.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'core/java/android/widget/TextView.java') diff --git a/core/java/android/widget/TextView.java b/core/java/android/widget/TextView.java index 6733c0d3a8e1..ffaa31552a6a 100644 --- a/core/java/android/widget/TextView.java +++ b/core/java/android/widget/TextView.java @@ -13872,7 +13872,7 @@ public class TextView extends View implements ViewTreeObserver.OnPreDrawListener */ @Nullable @Override - public ViewTranslationRequest createTranslationRequest(@NonNull int[] supportedFormats) { + public ViewTranslationRequest onCreateTranslationRequest(@NonNull int[] supportedFormats) { if (supportedFormats == null || supportedFormats.length == 0) { // TODO(b/182433547): remove before S release if (UiTranslationController.DEBUG) { @@ -13938,7 +13938,7 @@ public class TextView extends View implements ViewTreeObserver.OnPreDrawListener /** * - * Called when the content from {@link #createTranslationRequest} had been translated by the + * Called when the content from {@link #onCreateTranslationRequest} had been translated by the * TranslationService. The default implementation will replace the current * {@link TransformationMethod} to transform the original text to the translated text display. * -- cgit v1.2.3