Merge "Fix null pointer issue of accesibility learn more button click event" into sc-v2-dev am: e8582f9c31
am: 355ae871b5
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/15678258 Change-Id: I199e6d1b3f30cacfac3a15010242f9f5a4dc3239
This commit is contained in:
@@ -109,16 +109,16 @@ public class AccessibilityFooterPreferenceControllerTest {
|
||||
}
|
||||
|
||||
@Test
|
||||
public void onBindViewHolder_setupHelpLink_setCorrectHelpLinkAndContentDescription() {
|
||||
mController.setupHelpLink(TEST_HELP_ID, TEST_CONTENT_DESCRIPTION);
|
||||
public void onBindViewHolder_setHelpResource_emptyString_notVisible() {
|
||||
mController.setupHelpLink(R.string.help_url_timeout, TEST_CONTENT_DESCRIPTION);
|
||||
mController.displayPreference(mScreen);
|
||||
|
||||
mPreference.onBindViewHolder(mPreferenceViewHolder);
|
||||
|
||||
final TextView learnMoreView = (TextView) mPreferenceViewHolder
|
||||
.findViewById(com.android.settingslib.R.id.settingslib_learn_more);
|
||||
assertThat(learnMoreView.getContentDescription().toString())
|
||||
.contains(TEST_CONTENT_DESCRIPTION);
|
||||
assertThat(mPreference.isLinkEnabled()).isTrue();
|
||||
assertThat(learnMoreView.getContentDescription()).isNull();
|
||||
assertThat(learnMoreView.getVisibility()).isEqualTo(View.GONE);
|
||||
assertThat(mPreference.isLinkEnabled()).isFalse();
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user