diff options
| author | 2021-09-23 06:15:01 +0000 | |
|---|---|---|
| committer | 2021-09-23 06:15:01 +0000 | |
| commit | f0c99d831e852e1782e18b91384c0a85f1f96889 (patch) | |
| tree | 90dce0b93a34bfe87a02fcf117dd7e455f86c2f7 | |
| parent | f3d3be52605ce90afdde5dd0746db1aa0188ab42 (diff) | |
| parent | ec3f41e70e779666ff8a75b481390d1fef6b0168 (diff) | |
Merge "Fix translation doesn't work on ViewGroup" into sc-qpr1-dev
| -rw-r--r-- | core/java/android/view/translation/UiTranslationController.java | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/core/java/android/view/translation/UiTranslationController.java b/core/java/android/view/translation/UiTranslationController.java index 442d099f0678..f1c5a080a77b 100644 --- a/core/java/android/view/translation/UiTranslationController.java +++ b/core/java/android/view/translation/UiTranslationController.java @@ -598,9 +598,8 @@ public class UiTranslationController { final View rootView = roots.get(rootNum).getView(); if (rootView instanceof ViewGroup) { findViewsTraversalByAutofillIds((ViewGroup) rootView, sourceViewIds); - } else { - addViewIfNeeded(sourceViewIds, rootView); } + addViewIfNeeded(sourceViewIds, rootView); } } @@ -611,9 +610,8 @@ public class UiTranslationController { final View child = viewGroup.getChildAt(i); if (child instanceof ViewGroup) { findViewsTraversalByAutofillIds((ViewGroup) child, sourceViewIds); - } else { - addViewIfNeeded(sourceViewIds, child); } + addViewIfNeeded(sourceViewIds, child); } } |