1
0
mirror of https://github.com/owncloud/android-library.git synced 2025-06-07 07:56:19 +00:00

Merge pull request #285 from owncloud/feature/stop_supporting_android_kitkat

Get rid of Android 4.4 support
This commit is contained in:
David González Verdugo 2019-12-17 17:49:16 +01:00 committed by GitHub
commit e5939e8b70
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 9 deletions

View File

@ -19,7 +19,7 @@ android {
compileSdkVersion 28
defaultConfig {
minSdkVersion 19
minSdkVersion 21
targetSdkVersion 28
versionCode = 10000400

View File

@ -26,7 +26,6 @@ package com.owncloud.android.lib.common.http;
import android.content.Context;
import android.os.Build;
import com.owncloud.android.lib.common.OwnCloudClientManagerFactory;
import com.owncloud.android.lib.common.http.interceptors.HttpInterceptor;
import com.owncloud.android.lib.common.http.interceptors.RequestHeaderInterceptor;
@ -91,12 +90,7 @@ public class HttpClient {
SSLSocketFactory sslSocketFactory;
if (Build.VERSION.SDK_INT == Build.VERSION_CODES.KITKAT) {
// 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();
}
sslSocketFactory = sslContext.getSocketFactory();
// Automatic cookie handling, NOT PERSISTENT
CookieJar cookieJar = new CookieJar() {
@ -158,7 +152,7 @@ public class HttpClient {
public static void addHeaderForAllRequests(String headerName, String headerValue) {
HttpInterceptor httpInterceptor = getOkHttpInterceptor();
if(getOkHttpInterceptor() != null) {
if (getOkHttpInterceptor() != null) {
httpInterceptor.addRequestInterceptor(
new RequestHeaderInterceptor(headerName, headerValue)
);