From ce2a5db2c856329895f67ba3b4bad1d4fb0be38c Mon Sep 17 00:00:00 2001 From: Mark Punzalan Date: Mon, 15 Aug 2022 08:02:58 +0000 Subject: [PATCH] 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 --- core/java/android/view/View.java | 1 - 1 file changed, 1 deletion(-) diff --git a/core/java/android/view/View.java b/core/java/android/view/View.java index ba6ba63e4ed05..b0d465769deb2 100644 --- a/core/java/android/view/View.java +++ b/core/java/android/view/View.java @@ -12709,7 +12709,6 @@ public class View implements Drawable.Callback, KeyEvent.Callback, if (mViewTranslationCallback != null) { mViewTranslationCallback.onClearTranslation(this); } - clearViewTranslationCallback(); clearViewTranslationResponse(); if (hasTranslationTransientState()) { setHasTransientState(false);