mirror of
https://github.com/owncloud/android-library.git
synced 2025-06-07 16:06:08 +00:00
Remove kitkat support
This commit is contained in:
parent
a708b794c0
commit
3d9d943825
@ -19,7 +19,7 @@ android {
|
|||||||
compileSdkVersion 28
|
compileSdkVersion 28
|
||||||
|
|
||||||
defaultConfig {
|
defaultConfig {
|
||||||
minSdkVersion 19
|
minSdkVersion 21
|
||||||
targetSdkVersion 28
|
targetSdkVersion 28
|
||||||
|
|
||||||
versionCode = 10000300
|
versionCode = 10000300
|
||||||
|
@ -26,7 +26,6 @@ package com.owncloud.android.lib.common.http;
|
|||||||
|
|
||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
|
|
||||||
import android.os.Build;
|
|
||||||
import com.owncloud.android.lib.common.OwnCloudClientManagerFactory;
|
import com.owncloud.android.lib.common.OwnCloudClientManagerFactory;
|
||||||
import com.owncloud.android.lib.common.http.interceptors.HttpInterceptor;
|
import com.owncloud.android.lib.common.http.interceptors.HttpInterceptor;
|
||||||
import com.owncloud.android.lib.common.http.interceptors.RequestHeaderInterceptor;
|
import com.owncloud.android.lib.common.http.interceptors.RequestHeaderInterceptor;
|
||||||
@ -91,12 +90,7 @@ public class HttpClient {
|
|||||||
|
|
||||||
SSLSocketFactory sslSocketFactory;
|
SSLSocketFactory sslSocketFactory;
|
||||||
|
|
||||||
if (Build.VERSION.SDK_INT == Build.VERSION_CODES.KITKAT) {
|
sslSocketFactory = sslContext.getSocketFactory();
|
||||||
// TLS v1.2 is disabled by default in API 19, use custom SSLSocketFactory to enable it
|
|
||||||
sslSocketFactory = new TLSSocketFactory(sslContext.getSocketFactory());
|
|
||||||
} else {
|
|
||||||
sslSocketFactory = sslContext.getSocketFactory();
|
|
||||||
}
|
|
||||||
|
|
||||||
// Automatic cookie handling, NOT PERSISTENT
|
// Automatic cookie handling, NOT PERSISTENT
|
||||||
CookieJar cookieJar = new CookieJar() {
|
CookieJar cookieJar = new CookieJar() {
|
||||||
@ -158,7 +152,7 @@ public class HttpClient {
|
|||||||
public static void addHeaderForAllRequests(String headerName, String headerValue) {
|
public static void addHeaderForAllRequests(String headerName, String headerValue) {
|
||||||
HttpInterceptor httpInterceptor = getOkHttpInterceptor();
|
HttpInterceptor httpInterceptor = getOkHttpInterceptor();
|
||||||
|
|
||||||
if(getOkHttpInterceptor() != null) {
|
if (getOkHttpInterceptor() != null) {
|
||||||
httpInterceptor.addRequestInterceptor(
|
httpInterceptor.addRequestInterceptor(
|
||||||
new RequestHeaderInterceptor(headerName, headerValue)
|
new RequestHeaderInterceptor(headerName, headerValue)
|
||||||
);
|
);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user