Update tests for ENABLE_TWOLINE_ALLAPPS and ENABLE_TWOLINE_DEVICESEARCH

PM said we can enable ENABLE_TWOLINE_ALLAPPS and ENABLE_TWOLINE_DEVICESEARCH flags.

Since I am enabling two-line text for all apps, it's possible that the text would have other texts within the app name itself. For example, if a title of an app is long for example "Amazon Shopping" the title can now be like "Amazon\nShopping". For tests to recognize its "Amazon shopping", I am resorting to identifying the app title based on the content description.

Turn on the two feature flags in another CL

bug: 287307252
test: manual
Change-Id: I8bdc3db710514c9098ccb5d9781a100ac9b35eab
This commit is contained in:
Brandon Dayauon
2023-06-13 10:55:35 -07:00
parent 3ce64d592b
commit df4dfdba4d
6 changed files with 72 additions and 8 deletions

View File

@@ -147,9 +147,8 @@ public class ThemeIconsTest extends AbstractLauncherUiTest {
for (int i = parent.getChildCount() - 1; i >= 0; i--) {
viewQueue.add(parent.getChildAt(i));
}
} else if (view instanceof BubbleTextView) {
BubbleTextView btv = (BubbleTextView) view;
if (title.equals(btv.getText())) {
} else if (view instanceof BubbleTextView btv) {
if (title.equals(btv.getContentDescription().toString())) {
icon = btv;
break;
}