@SuppressWarnings("unchecked") // The generic passed to anyOf
  public static void setSuppressingResultMatcher(
      final Matcher<? super AccessibilityViewCheckResult> matcher) {
    initializeValidator();
    /* Suppress all touch target results, since views all report size as 0x0 */
    Matcher<AccessibilityCheckResult> touchTargetResultMatcher = 
        AccessibilityCheckResultUtils.matchesChecks(
            Matchers.equalTo(TouchTargetSizeViewCheck.class));
    Matcher<AccessibilityCheckResult> duplicateBoundsResultMatcher = 
        AccessibilityCheckResultUtils.matchesChecks(
            Matchers.equalTo(DuplicateClickableBoundsViewCheck.class));
    if (matcher == null) {
      validator.setSuppressingResultMatcher(
          Matchers.anyOf(touchTargetResultMatcher, duplicateBoundsResultMatcher));
    } else {
      validator.setSuppressingResultMatcher(
          Matchers.anyOf(matcher, touchTargetResultMatcher, duplicateBoundsResultMatcher));
    }
  }
@SuppressWarnings("unchecked") 
  public static void setSuppressingResultMatcher(
      final Matcher<? super AccessibilityViewCheckResult> matcher) {
    initializeValidator();
    
    Matcher<AccessibilityCheckResult> touchTargetResultMatcher = 
        AccessibilityCheckResultUtils.matchesChecks(
            Matchers.equalTo(TouchTargetSizeViewCheck.class));
    Matcher<AccessibilityCheckResult> duplicateBoundsResultMatcher = 
        AccessibilityCheckResultUtils.matchesChecks(
            Matchers.equalTo(DuplicateClickableBoundsViewCheck.class));
    if (matcher == null) {
      validator.setSuppressingResultMatcher(
          Matchers.anyOf(touchTargetResultMatcher, duplicateBoundsResultMatcher));
    } else {
      validator.setSuppressingResultMatcher(
          Matchers.anyOf(matcher, touchTargetResultMatcher, duplicateBoundsResultMatcher));
    }
  }
@ SuppressWarnings ( "unchecked" ) // The generic passed to anyOf public static void setSuppressingResultMatcher ( final Matcher < ? super AccessibilityViewCheckResult > matcher ) { initializeValidator ( ) ; /* Suppress all touch target results, since views all report size as 0x0 */ Matcher < AccessibilityCheckResult > touchTargetResultMatcher = AccessibilityCheckResultUtils . matchesChecks ( Matchers . equalTo ( TouchTargetSizeViewCheck . class ) ) ; Matcher < AccessibilityCheckResult > duplicateBoundsResultMatcher = AccessibilityCheckResultUtils . matchesChecks ( Matchers . equalTo ( DuplicateClickableBoundsViewCheck . class ) ) ; if ( matcher == null ) { validator . setSuppressingResultMatcher ( Matchers . anyOf ( touchTargetResultMatcher , duplicateBoundsResultMatcher ) ) ; } else { validator . setSuppressingResultMatcher ( Matchers . anyOf ( matcher , touchTargetResultMatcher , duplicateBoundsResultMatcher ) ) ; } }
Suppress all results that match the given matcher. Suppressed results will not be included
in any logs or cause any {@code Exception} to be thrown. This capability is useful if there
are known issues, but checks should still look for regressions.

@param matcher A matcher to match a {@link AccessibilityViewCheckResult}. {@code null}
disables suppression and is the default.
Suppress all results that match the given matcher . Suppressed results will not be included in any logs or cause any { @code Exception } to be thrown . This capability is useful if there are known issues but checks should still look for regressions .