mirror of
https://github.com/commons-app/apps-android-commons.git
synced 2025-11-04 16:53:55 +01:00
5120: Put back unwanted changes
This commit is contained in:
parent
cc115f1e76
commit
f96a5edbb9
1 changed files with 16 additions and 21 deletions
|
|
@ -19,19 +19,15 @@ import org.wikipedia.dataclient.okhttp.HttpStatusException;
|
|||
import timber.log.Timber;
|
||||
|
||||
public final class OkHttpConnectionFactory {
|
||||
|
||||
private static final String CACHE_DIR_NAME = "okhttp-cache";
|
||||
private static final long NET_CACHE_SIZE = 64 * 1024 * 1024;
|
||||
@NonNull
|
||||
private static final Cache NET_CACHE = new Cache(
|
||||
new File(CommonsApplication.getInstance().getCacheDir(),
|
||||
@NonNull private static final Cache NET_CACHE = new Cache(new File(CommonsApplication.getInstance().getCacheDir(),
|
||||
CACHE_DIR_NAME), NET_CACHE_SIZE);
|
||||
|
||||
@NonNull
|
||||
private static final OkHttpClient CLIENT = createClient();
|
||||
|
||||
@NonNull
|
||||
public static OkHttpClient getClient() {
|
||||
@NonNull public static OkHttpClient getClient() {
|
||||
return CLIENT;
|
||||
}
|
||||
|
||||
|
|
@ -72,7 +68,6 @@ public final class OkHttpConnectionFactory {
|
|||
}
|
||||
|
||||
public static class UnsuccessfulResponseInterceptor implements Interceptor {
|
||||
|
||||
private static final List<String> DO_NOT_INTERCEPT = Collections.singletonList(
|
||||
"api.php?format=json&formatversion=2&errorformat=plaintext&action=upload&ignorewarnings=1");
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue