code: @Deprecated
      public CharsetDetector setDetectableCharset(String encoding, boolean enabled) {
          int modIdx = -1;
          boolean isDefaultVal = false;
          for (int i = 0; i < ALL_CS_RECOGNIZERS.size(); i++) {
              CSRecognizerInfo csrinfo = ALL_CS_RECOGNIZERS.get(i);
              if (csrinfo.recognizer.getName().equals(encoding)) {
                  modIdx = i;
                  isDefaultVal = (csrinfo.isDefaultEnabled == enabled);
                  break;
              }
          }
          if (modIdx < 0) {
              // No matching encoding found
              throw new IllegalArgumentException("Invalid encoding: " + "\"" + encoding + "\"");
          }
  
          if (fEnabledRecognizers == null && !isDefaultVal) {
              // Create an array storing the non default setting
              fEnabledRecognizers = new boolean[ALL_CS_RECOGNIZERS.size()];
  
              // Initialize the array with default info
              for (int i = 0; i < ALL_CS_RECOGNIZERS.size(); i++) {
                  fEnabledRecognizers[i] = ALL_CS_RECOGNIZERS.get(i).isDefaultEnabled;
              }
          }
   
          if (fEnabledRecognizers != null) {
              fEnabledRecognizers[modIdx] = enabled;
          }
  
          return this;
      }
docs: Enable or disable individual charset encoding.
  A name of charset encoding must be included in the names returned by
  {@link #getAllDetectableCharsets()}.
  
  @param encoding the name of charset encoding.
  @param enabled <code>true</code> to enable, or <code>false</code> to disable the
  charset encoding.
  @return A reference to this <code>CharsetDetector</code>.
  @throws IllegalArgumentException when the name of charset encoding is
  not supported.
  
  @deprecated This API is ICU internal only.
  @hide draft / provisional / internal are hidden on Android