Skip to content
This repository was archived by the owner on Mar 19, 2024. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion owncloudComLibrary/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ android {
compileSdkVersion 28

defaultConfig {
minSdkVersion 19
minSdkVersion 21
targetSdkVersion 28

versionCode = 10000300
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@

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;
Expand Down Expand Up @@ -91,12 +90,7 @@ public static OkHttpClient getOkHttpClient() {

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() {
Expand Down Expand Up @@ -158,7 +152,7 @@ private static HttpInterceptor getOkHttpInterceptor() {
public static void addHeaderForAllRequests(String headerName, String headerValue) {
HttpInterceptor httpInterceptor = getOkHttpInterceptor();

if(getOkHttpInterceptor() != null) {
if (getOkHttpInterceptor() != null) {
httpInterceptor.addRequestInterceptor(
new RequestHeaderInterceptor(headerName, headerValue)
);
Expand Down