Translate: Ignore duplicate translations. am: 02fe90bb42
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/14661090 Change-Id: I06dc3492f8d6fc0568c73f7e28b86ca4bfeadd3b
This commit is contained in:
@@ -389,6 +389,14 @@ public class UiTranslationController {
|
||||
continue;
|
||||
}
|
||||
mActivity.runOnUiThread(() -> {
|
||||
if (view.getViewTranslationResponse() != null
|
||||
&& view.getViewTranslationResponse().equals(response)) {
|
||||
if (DEBUG) {
|
||||
Log.d(TAG, "Duplicate ViewTranslationResponse for " + autofillId
|
||||
+ ". Ignoring.");
|
||||
}
|
||||
return;
|
||||
}
|
||||
ViewTranslationCallback callback = view.getViewTranslationCallback();
|
||||
if (callback == null) {
|
||||
if (view instanceof TextView) {
|
||||
|
||||
Reference in New Issue
Block a user