Merge "Fix talkback doesn't speak subtext info" into sc-dev am: 10e732bd59 am: d66f004a86 am: 6fba19fbf4

Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/14663077

Change-Id: I2695da656b4838c58ec7dd43c4ea57d0e107a197
This commit is contained in:
TreeHugger Robot
2021-05-21 08:59:04 +00:00
committed by Automerger Merge Worker
3 changed files with 28 additions and 6 deletions

View File

@@ -69,6 +69,22 @@ public class ApplicationViewHolderTest {
assertThat(mHolder.mSummary.getText()).isEqualTo(mContext.getText(R.string.disabled));
}
@Test
public void setTitle_titleIsNotEmptyAndContentIsNotEmpty_shouldSetTitleAndContentDescription() {
mHolder.setTitle("title", "content");
assertThat(mHolder.mAppName).isEqualTo("title");
assertThat(mHolder.mAppName.getContentDescription()).isEqualTo("content");
}
@Test
public void setTitle_titleIsNotEmptyButContentIsEmpty_shouldSetTitle() {
mHolder.setTitle("title", "");
assertThat(mHolder.mAppName).isEqualTo("title");
assertThat(mHolder.mAppName.getContentDescription()).isEqualTo("title");
}
@Test
public void updateSize() {
final String invalidStr = "invalid";