class UriUtil {

  public static Uri removeQueryParameter(Uri uri, String queryParameterName) {
    Uri.Builder builder = uri.buildUpon();
    builder.clearQuery();
    for (String key : uri.getQueryParameterNames()) {
      if (!key.equals(queryParameterName)) {
        for (String value : uri.getQueryParameters(key)) {
          builder.appendQueryParameter(key, value);
        }
      }
    }
    return builder.build();
  }

  private  UriUtil();

}