private void checkValidation() {
    if (validateHost() && validatePort() && validateBypass()) {
      ((ProxyDetailActivity) getActivity()).enableSave();
    } else {
      ((ProxyDetailActivity) getActivity()).disableSave();
    }

    // TODO: Add check for duplicated configuration to Async handler
    proxyDuplicatedBanner.setVisibility(View.GONE);
    String host = selectedProxy.host;
    Integer port = selectedProxy.port;
    if (host != null && port != null) {
      List<Long> duplicatedIDs = App.getDBManager().findDuplicatedProxy(host, port);
      if (selectedProxy.isPersisted) {
        proxyDuplicatedBanner.setVisibility(UIUtils.booleanToVisibility(duplicatedIDs.size() > 1));
      } else {
        proxyDuplicatedBanner.setVisibility(UIUtils.booleanToVisibility(duplicatedIDs.size() > 0));
      }
    }
  }
  private void refreshUI() {
    if (selectedProxy != null) {
      proxyInUseBanner.setVisibility(UIUtils.booleanToVisibility(selectedProxy.getInUse()));

      proxyHost.setValue(selectedProxy.host);
      if (selectedProxy.port != null && selectedProxy.port != 0) {
        proxyPort.setValue(selectedProxy.port);
      }

      proxyBypass.setExclusionString(selectedProxy.exclusion);
      //                proxyTags.setTags(selectedProxy.getTags());

      checkValidation();
    } else {
      // TODO: Add handling here
      EventReportingUtils.sendException(new Exception("NO PROXY SELECTED"));
    }
  }