Don't reset translation callback with other state

This fixes issues with Views that have their own custom
ViewTranslationCallback.

Bug: 236678324
Test: atest CtsTranslationTestCases
Test: manual - Verified on chat app that uses their own custom
ViewTranslationCallback; old and new messages are translated
Test: manual - Spot-checked translation on a few other chat apps

Change-Id: If4194bc8cde73a9cebb7b56594f6982855374410
This commit is contained in:
Mark Punzalan
2022-08-15 08:02:58 +00:00
parent 9d16d9dacb
commit ce2a5db2c8

View File

@@ -12709,7 +12709,6 @@ public class View implements Drawable.Callback, KeyEvent.Callback,
if (mViewTranslationCallback != null) {
mViewTranslationCallback.onClearTranslation(this);
}
clearViewTranslationCallback();
clearViewTranslationResponse();
if (hasTranslationTransientState()) {
setHasTransientState(false);