Merge "Fix translation doesn't work on ViewGroup" into sc-qpr1-dev am: f0c99d831e am: dedd68e52e am: 30a84e50e2

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

Change-Id: I1265a0f30193dcd833357a96dddc6b339c166121
This commit is contained in:
Joanne Chung
2021-09-23 07:06:22 +00:00
committed by Automerger Merge Worker

View File

@@ -592,9 +592,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);
}
}
@@ -605,9 +604,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);
}
}