Skip to content
This repository has been archived by the owner on Nov 28, 2024. It is now read-only.

Commit

Permalink
Utils.java: removed unused code
Browse files Browse the repository at this point in the history
  • Loading branch information
Alkarex committed May 3, 2015
1 parent 9f5d872 commit 98040e9
Showing 1 changed file with 3 additions and 31 deletions.
34 changes: 3 additions & 31 deletions src/com/pursuer/reader/easyrss/Utils.java
Original file line number Diff line number Diff line change
Expand Up @@ -15,25 +15,14 @@
import java.net.URLDecoder;
import java.net.URLEncoder;
import java.util.Date;
import org.apache.http.HttpVersion;
import org.apache.http.impl.client.DefaultHttpClient;
import org.apache.http.impl.conn.tsccm.ThreadSafeClientConnManager;
import org.apache.http.params.BasicHttpParams;
import org.apache.http.params.HttpParams;
import org.apache.http.params.HttpProtocolParams;
import org.apache.http.protocol.HTTP;
import org.apache.http.conn.scheme.SchemeRegistry;
import org.apache.http.conn.scheme.PlainSocketFactory;
import org.apache.http.conn.ssl.SSLSocketFactory;
import org.apache.http.conn.scheme.Scheme;

import android.content.Context;
import android.database.Cursor;

import com.pursuer.reader.easyrss.account.ReaderAccountMgr;
import com.pursuer.reader.easyrss.data.DataMgr;
import com.pursuer.reader.easyrss.network.NetworkMgr;

import android.content.Context;
import android.database.Cursor;

final public class Utils {
@SuppressWarnings("unchecked")
public static <T> T[] arrayMerge(final T[]... arrays) {
Expand All @@ -51,23 +40,6 @@ public static <T> T[] arrayMerge(final T[]... arrays) {
return mergedArray;
}

public static DefaultHttpClient createHttpClient() {
final HttpParams config = new BasicHttpParams();
HttpProtocolParams.setVersion(config, HttpVersion.HTTP_1_1);
HttpProtocolParams.setContentCharset(config, HTTP.UTF_8);
HttpProtocolParams.setUserAgent(config, Utils.class.getName());

final SchemeRegistry reg = new SchemeRegistry();
reg.register(new Scheme("http", PlainSocketFactory.getSocketFactory(), 80));
reg.register(new Scheme("https", SSLSocketFactory.getSocketFactory(), 443));

final ThreadSafeClientConnManager manager = new ThreadSafeClientConnManager(config, reg);

final DefaultHttpClient client = new DefaultHttpClient(manager, config);
client.getParams().setParameter("http.socket.timeout", 30 * 1000);
return client;
}

@SuppressWarnings("deprecation")
public static String decodeSubscriptionURL(final String url) {
if (url.startsWith("feed/")) {
Expand Down

0 comments on commit 98040e9

Please sign in to comment.