changed Dns to TwidereDns

This commit is contained in:
Mariotaku Lee 2016-02-12 15:19:38 +08:00
parent ddc94a718d
commit eb4474ade6
4 changed files with 8 additions and 13 deletions

View File

@ -129,6 +129,7 @@ import org.mariotaku.twidere.util.Utils;
import org.mariotaku.twidere.util.collection.CompactHashSet;
import org.mariotaku.twidere.util.dagger.GeneralComponentHelper;
import org.mariotaku.twidere.util.message.UnreadCountUpdatedEvent;
import org.mariotaku.twidere.util.net.TwidereDns;
import org.oshkimaadziig.george.androidutils.SpanFormatter;
import java.io.File;
@ -147,8 +148,6 @@ import java.util.regex.Pattern;
import javax.inject.Inject;
import okhttp3.Dns;
public final class TwidereDataProvider extends ContentProvider implements Constants, OnSharedPreferenceChangeListener,
LazyLoadCallback {
@ -165,7 +164,7 @@ public final class TwidereDataProvider extends ContentProvider implements Consta
@Inject
SharedPreferencesWrapper mPreferences;
@Inject
Dns mDns;
TwidereDns mDns;
@Inject
Bus mBus;
@Inject

View File

@ -72,7 +72,6 @@ import javax.inject.Singleton;
import dagger.Module;
import dagger.Provides;
import edu.tsinghua.hotmobi.HotMobiLogger;
import okhttp3.Dns;
import static org.mariotaku.twidere.util.Utils.getInternalCacheDir;
@ -134,7 +133,7 @@ public class ApplicationModule implements Constants {
@Provides
@Singleton
public RestHttpClient restHttpClient(SharedPreferencesWrapper prefs, Dns dns) {
public RestHttpClient restHttpClient(SharedPreferencesWrapper prefs, TwidereDns dns) {
return HttpClientFactory.createRestHttpClient(application, prefs, dns);
}
@ -196,7 +195,7 @@ public class ApplicationModule implements Constants {
@Provides
@Singleton
public Dns dns(SharedPreferencesWrapper preferences) {
public TwidereDns dns(SharedPreferencesWrapper preferences) {
return new TwidereDns(application, preferences);
}

View File

@ -20,7 +20,6 @@
package org.mariotaku.twidere.util.dagger;
import android.content.Context;
import android.content.SharedPreferences;
import org.mariotaku.restfu.http.RestHttpClient;
import org.mariotaku.twidere.util.ActivityTracker;
@ -28,11 +27,11 @@ import org.mariotaku.twidere.util.ExternalThemeManager;
import org.mariotaku.twidere.util.ReadStateManager;
import org.mariotaku.twidere.util.SharedPreferencesWrapper;
import org.mariotaku.twidere.util.TwidereValidator;
import org.mariotaku.twidere.util.net.TwidereDns;
import javax.inject.Inject;
import edu.tsinghua.hotmobi.HotMobiLogger;
import okhttp3.Dns;
/**
* Created by mariotaku on 15/12/31.
@ -51,7 +50,7 @@ public class DependencyHolder {
@Inject
ActivityTracker mActivityTracker;
@Inject
Dns mDns;
TwidereDns mDns;
@Inject
TwidereValidator mValidator;
@Inject
@ -86,7 +85,7 @@ public class DependencyHolder {
return mActivityTracker;
}
public Dns getDns() {
public TwidereDns getDns() {
return mDns;
}

View File

@ -39,14 +39,12 @@ import java.util.List;
import javax.inject.Inject;
import okhttp3.Dns;
/**
* Created by mariotaku on 15/12/31.
*/
public class TwidereProxySelector extends ProxySelector {
@Inject
Dns dns;
TwidereDns dns;
private final Proxy.Type type;
@NonNull
private final String host;