Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 5c85d4f0 authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Automerger Merge Worker
Browse files

Merge "Clear the ViewTranslationResponse on finishing UiTranslation." into...

Merge "Clear the ViewTranslationResponse on finishing UiTranslation." into sc-dev am: 2828678b am: fe2cee84

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/14922772

Change-Id: I547fe45870b4239d95e5a00d05e68479a21c4504
parents a5605af8 fe2cee84
Loading
Loading
Loading
Loading
+10 −0
Original line number Diff line number Diff line
@@ -30928,6 +30928,16 @@ public class View implements Drawable.Callback, KeyEvent.Callback,
        mViewTranslationResponse = response;
    }
    /**
     * Clears the ViewTranslationResponse stored by the default implementation of {@link
     * #onViewTranslationResponse}.
     *
     * @hide
     */
    public void clearViewTranslationResponse() {
        mViewTranslationResponse = null;
    }
    /**
     * Called when the content from {@link View#onCreateVirtualViewTranslationRequests} had been
     * translated by the TranslationService.
+1 −0
Original line number Diff line number Diff line
@@ -155,6 +155,7 @@ public class UiTranslationController {
                destroyTranslators();
                runForEachView((view, callback) -> {
                    callback.onClearTranslation(view);
                    view.clearViewTranslationResponse();
                    if (view.hasTranslationTransientState()) {
                        view.setHasTransientState(false);
                        view.setHasTranslationTransientState(false);