mirror of
https://github.com/owncloud/android-library.git
synced 2025-06-07 16:06:08 +00:00
Merge pull request #109 from owncloud/target_marshmallow
Updated build target to Android APIv23
This commit is contained in:
commit
1007a80534
@ -2,8 +2,11 @@ sudo: false
|
||||
language: android
|
||||
android:
|
||||
components:
|
||||
- build-tools-22.0.1
|
||||
- android-19
|
||||
- platform-tools
|
||||
- tools
|
||||
- build-tools-23.0.2
|
||||
- android-23
|
||||
- sys-img-armeabi-v7a-android-23
|
||||
branches:
|
||||
only:
|
||||
- master
|
||||
@ -33,7 +36,7 @@ env:
|
||||
- secure: AnxLVarfwM7IhJ7Sca35USyRlFHFvlcBhWTt2TVDcyQ+ldDyb+U6IWXFK0Yy82QP0ZH/RCLu7FnmHK/rKG0BHNRt1Ymco1VkTQql0MZcHXP+4IKgEvgJyUn1TqYj+hSVmM6lgTA+QUjZYGSfwU8mhUFiU7644ZTdTe6ALdqa+v8=
|
||||
- secure: ezKyZbb3q1Phcv/vJntuJe0C2req+Hp4/C+tFZIWZ3o8wRO9jVI3bnED9TWQyQOOT0SoRYjJ5zqp0UcEOGCzPeWFO6bA7RWp+zA/R9sziLNcVWMVv3WXnuClQjPBHJeXRnP7YmNjxDmSfV97a14dk5d9LgJZYliTDepH4dLsxro=
|
||||
matrix:
|
||||
- ANDROID_TARGET=android-19 ANDROID_ABI=armeabi-v7a
|
||||
- ANDROID_TARGET=android-23 ANDROID_ABI=armeabi-v7a
|
||||
addons:
|
||||
coverity_scan:
|
||||
project:
|
||||
|
@ -30,7 +30,7 @@
|
||||
|
||||
<uses-sdk
|
||||
android:minSdkVersion="8"
|
||||
android:targetSdkVersion="19" />
|
||||
android:targetSdkVersion="23" />
|
||||
|
||||
</manifest>
|
||||
|
||||
|
@ -3,7 +3,7 @@ buildscript {
|
||||
mavenCentral()
|
||||
}
|
||||
dependencies {
|
||||
classpath 'com.android.tools.build:gradle:1.2.3'
|
||||
classpath 'com.android.tools.build:gradle:1.5.0'
|
||||
}
|
||||
}
|
||||
|
||||
@ -18,8 +18,8 @@ dependencies {
|
||||
}
|
||||
|
||||
android {
|
||||
compileSdkVersion 19
|
||||
buildToolsVersion "22.0.1"
|
||||
compileSdkVersion 23
|
||||
buildToolsVersion "23.0.2"
|
||||
|
||||
sourceSets {
|
||||
main {
|
||||
|
@ -11,5 +11,5 @@
|
||||
#proguard.config=${sdk.dir}/tools/proguard/proguard-android.txt:proguard-project.txt
|
||||
|
||||
# Project target.
|
||||
target=android-19
|
||||
target=android-23
|
||||
android.library=true
|
||||
|
@ -30,7 +30,7 @@
|
||||
<uses-permission android:name="android.permission.INTERNET" />
|
||||
<uses-sdk
|
||||
android:minSdkVersion="8"
|
||||
android:targetSdkVersion="19" />
|
||||
android:targetSdkVersion="23" />
|
||||
<application android:label="@string/app_name" android:icon="@drawable/ic_launcher">
|
||||
<activity android:name="MainActivity"
|
||||
android:label="@string/app_name"
|
||||
|
@ -9,8 +9,8 @@ dependencies {
|
||||
}
|
||||
|
||||
android {
|
||||
compileSdkVersion 19
|
||||
buildToolsVersion "22.0.1"
|
||||
compileSdkVersion 23
|
||||
buildToolsVersion "23.0.2"
|
||||
|
||||
sourceSets {
|
||||
main {
|
||||
|
@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME
|
||||
distributionPath=wrapper/dists
|
||||
zipStoreBase=GRADLE_USER_HOME
|
||||
zipStorePath=wrapper/dists
|
||||
distributionUrl=http\://services.gradle.org/distributions/gradle-1.12-all.zip
|
||||
distributionUrl=http\://services.gradle.org/distributions/gradle-2.2.1-all.zip
|
||||
|
@ -11,5 +11,5 @@
|
||||
#proguard.config=${sdk.dir}/tools/proguard/proguard-android.txt:proguard-project.txt
|
||||
|
||||
# Project target.
|
||||
target=android-19
|
||||
target=android-23
|
||||
android.library.reference.1=..
|
||||
|
@ -36,14 +36,13 @@ import org.apache.commons.httpclient.HttpConnectionManager;
|
||||
import org.apache.commons.httpclient.HttpException;
|
||||
import org.apache.commons.httpclient.HttpMethod;
|
||||
import org.apache.commons.httpclient.HttpMethodBase;
|
||||
import org.apache.commons.httpclient.HttpStatus;
|
||||
import org.apache.commons.httpclient.HttpVersion;
|
||||
import org.apache.commons.httpclient.URI;
|
||||
import org.apache.commons.httpclient.cookie.CookiePolicy;
|
||||
import org.apache.commons.httpclient.methods.HeadMethod;
|
||||
import org.apache.commons.httpclient.params.HttpMethodParams;
|
||||
import org.apache.commons.httpclient.params.HttpParams;
|
||||
import org.apache.http.HttpStatus;
|
||||
import org.apache.http.params.CoreProtocolPNames;
|
||||
|
||||
import android.net.Uri;
|
||||
|
||||
@ -60,6 +59,7 @@ public class OwnCloudClient extends HttpClient {
|
||||
public static final int MAX_REDIRECTIONS_COUNT = 3;
|
||||
private static final String PARAM_SINGLE_COOKIE_HEADER = "http.protocol.single-cookie-header";
|
||||
private static final boolean PARAM_SINGLE_COOKIE_HEADER_VALUE = true;
|
||||
private static final String PARAM_PROTOCOL_VERSION = "http.protocol.version";
|
||||
|
||||
private static byte[] sExhaustBuffer = new byte[1024];
|
||||
|
||||
@ -89,7 +89,7 @@ public class OwnCloudClient extends HttpClient {
|
||||
String userAgent = OwnCloudClientManagerFactory.getUserAgent();
|
||||
getParams().setParameter(HttpMethodParams.USER_AGENT, userAgent);
|
||||
getParams().setParameter(
|
||||
CoreProtocolPNames.PROTOCOL_VERSION,
|
||||
PARAM_PROTOCOL_VERSION,
|
||||
HttpVersion.HTTP_1_1);
|
||||
|
||||
getParams().setCookiePolicy(
|
||||
|
@ -27,7 +27,7 @@
|
||||
|
||||
package com.owncloud.android.lib.common.network;
|
||||
|
||||
import org.apache.http.HttpStatus;
|
||||
import org.apache.commons.httpclient.HttpStatus;
|
||||
|
||||
import java.util.Arrays;
|
||||
|
||||
@ -53,7 +53,6 @@ public class RedirectionPath {
|
||||
private String[] mLocations = null;
|
||||
|
||||
private int mLastLocation = -1;
|
||||
private int maxRedirections;
|
||||
|
||||
/**
|
||||
* Public constructor.
|
||||
|
@ -36,8 +36,8 @@ import java.util.concurrent.atomic.AtomicBoolean;
|
||||
|
||||
import org.apache.commons.httpclient.Header;
|
||||
import org.apache.commons.httpclient.HttpException;
|
||||
import org.apache.commons.httpclient.HttpStatus;
|
||||
import org.apache.commons.httpclient.methods.GetMethod;
|
||||
import org.apache.http.HttpStatus;
|
||||
|
||||
import com.owncloud.android.lib.common.OwnCloudClient;
|
||||
import com.owncloud.android.lib.common.network.OnDatatransferProgressListener;
|
||||
|
@ -25,7 +25,7 @@ package com.owncloud.android.lib.resources.files;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
||||
import org.apache.http.HttpStatus;
|
||||
import org.apache.commons.httpclient.HttpStatus;
|
||||
import org.apache.jackrabbit.webdav.DavConstants;
|
||||
import org.apache.jackrabbit.webdav.MultiStatus;
|
||||
import org.apache.jackrabbit.webdav.client.methods.PropFindMethod;
|
||||
|
@ -26,7 +26,7 @@ package com.owncloud.android.lib.resources.files;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
||||
import org.apache.http.HttpStatus;
|
||||
import org.apache.commons.httpclient.HttpStatus;
|
||||
import org.apache.jackrabbit.webdav.DavConstants;
|
||||
import org.apache.jackrabbit.webdav.MultiStatus;
|
||||
import org.apache.jackrabbit.webdav.client.methods.PropFindMethod;
|
||||
|
@ -32,9 +32,9 @@ import java.util.HashSet;
|
||||
import java.util.Set;
|
||||
import java.util.concurrent.atomic.AtomicBoolean;
|
||||
|
||||
import org.apache.commons.httpclient.HttpStatus;
|
||||
import org.apache.commons.httpclient.methods.PutMethod;
|
||||
import org.apache.commons.httpclient.methods.RequestEntity;
|
||||
import org.apache.http.HttpStatus;
|
||||
|
||||
import com.owncloud.android.lib.common.OwnCloudClient;
|
||||
import com.owncloud.android.lib.common.network.FileRequestEntity;
|
||||
|
@ -26,8 +26,8 @@
|
||||
|
||||
package com.owncloud.android.lib.resources.shares;
|
||||
|
||||
import org.apache.commons.httpclient.HttpStatus;
|
||||
import org.apache.commons.httpclient.methods.PostMethod;
|
||||
import org.apache.http.HttpStatus;
|
||||
|
||||
import com.owncloud.android.lib.common.OwnCloudClient;
|
||||
import com.owncloud.android.lib.common.operations.RemoteOperation;
|
||||
|
@ -30,8 +30,8 @@ import com.owncloud.android.lib.common.operations.RemoteOperation;
|
||||
import com.owncloud.android.lib.common.operations.RemoteOperationResult;
|
||||
import com.owncloud.android.lib.common.utils.Log_OC;
|
||||
|
||||
import org.apache.commons.httpclient.HttpStatus;
|
||||
import org.apache.commons.httpclient.methods.GetMethod;
|
||||
import org.apache.http.HttpStatus;
|
||||
|
||||
/**
|
||||
* Get the data about a Share resource, known its remote ID.
|
||||
|
@ -34,8 +34,8 @@ import com.owncloud.android.lib.common.operations.RemoteOperation;
|
||||
import com.owncloud.android.lib.common.operations.RemoteOperationResult;
|
||||
import com.owncloud.android.lib.common.utils.Log_OC;
|
||||
|
||||
import org.apache.commons.httpclient.HttpStatus;
|
||||
import org.apache.commons.httpclient.methods.GetMethod;
|
||||
import org.apache.http.HttpStatus;
|
||||
import org.json.JSONArray;
|
||||
import org.json.JSONObject;
|
||||
|
||||
|
@ -26,9 +26,9 @@
|
||||
|
||||
package com.owncloud.android.lib.resources.shares;
|
||||
|
||||
import org.apache.commons.httpclient.HttpStatus;
|
||||
import org.apache.commons.httpclient.NameValuePair;
|
||||
import org.apache.commons.httpclient.methods.GetMethod;
|
||||
import org.apache.http.HttpStatus;
|
||||
|
||||
import com.owncloud.android.lib.common.OwnCloudClient;
|
||||
import com.owncloud.android.lib.common.operations.RemoteOperation;
|
||||
|
@ -26,8 +26,8 @@
|
||||
|
||||
package com.owncloud.android.lib.resources.shares;
|
||||
|
||||
import org.apache.commons.httpclient.HttpStatus;
|
||||
import org.apache.commons.httpclient.methods.GetMethod;
|
||||
import org.apache.http.HttpStatus;
|
||||
|
||||
import com.owncloud.android.lib.common.OwnCloudClient;
|
||||
import com.owncloud.android.lib.common.operations.RemoteOperation;
|
||||
|
@ -33,9 +33,9 @@ package com.owncloud.android.lib.resources.shares;
|
||||
import com.owncloud.android.lib.common.operations.RemoteOperationResult;
|
||||
import com.owncloud.android.lib.common.utils.Log_OC;
|
||||
|
||||
import org.apache.commons.httpclient.HttpStatus;
|
||||
import org.apache.commons.httpclient.methods.PutMethod;
|
||||
import org.apache.commons.httpclient.methods.StringRequestEntity;
|
||||
import org.apache.http.HttpStatus;
|
||||
|
||||
import java.text.DateFormat;
|
||||
import java.text.SimpleDateFormat;
|
||||
|
@ -32,8 +32,8 @@ import com.owncloud.android.lib.common.operations.RemoteOperation;
|
||||
import com.owncloud.android.lib.common.operations.RemoteOperationResult;
|
||||
import com.owncloud.android.lib.common.utils.Log_OC;
|
||||
|
||||
import org.apache.commons.httpclient.HttpStatus;
|
||||
import org.apache.commons.httpclient.methods.GetMethod;
|
||||
import org.apache.http.HttpStatus;
|
||||
import org.json.JSONObject;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
@ -26,8 +26,8 @@ package com.owncloud.android.lib.resources.users;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
||||
import org.apache.commons.httpclient.HttpStatus;
|
||||
import org.apache.commons.httpclient.methods.GetMethod;
|
||||
import org.apache.http.HttpStatus;
|
||||
import org.json.JSONObject;
|
||||
|
||||
import com.owncloud.android.lib.common.OwnCloudClient;
|
||||
|
@ -39,7 +39,7 @@
|
||||
|
||||
<uses-sdk
|
||||
android:minSdkVersion="8"
|
||||
android:targetSdkVersion="19" />
|
||||
android:targetSdkVersion="23" />
|
||||
|
||||
<application
|
||||
android:allowBackup="true"
|
||||
|
@ -11,8 +11,8 @@ dependencies {
|
||||
}
|
||||
|
||||
android {
|
||||
compileSdkVersion 19
|
||||
buildToolsVersion "22.0.1"
|
||||
compileSdkVersion 23
|
||||
buildToolsVersion "23.0.2"
|
||||
|
||||
sourceSets {
|
||||
main {
|
||||
|
@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME
|
||||
distributionPath=wrapper/dists
|
||||
zipStoreBase=GRADLE_USER_HOME
|
||||
zipStorePath=wrapper/dists
|
||||
distributionUrl=http\://services.gradle.org/distributions/gradle-1.12-all.zip
|
||||
distributionUrl=http\://services.gradle.org/distributions/gradle-2.2.1-all.zip
|
||||
|
@ -11,5 +11,5 @@
|
||||
#proguard.config=${sdk.dir}/tools/proguard/proguard-android.txt:proguard-project.txt
|
||||
|
||||
# Project target.
|
||||
target=android-19
|
||||
target=android-23
|
||||
android.library.reference.1=..
|
||||
|
@ -37,7 +37,6 @@ import android.app.Activity;
|
||||
import android.content.Context;
|
||||
import android.net.Uri;
|
||||
import android.os.Bundle;
|
||||
import android.os.Environment;
|
||||
import android.util.Log;
|
||||
import android.view.Menu;
|
||||
|
||||
@ -227,8 +226,8 @@ public class TestActivity extends Activity {
|
||||
public RemoteOperationResult downloadFile(RemoteFile remoteFile, String temporalFolder) {
|
||||
// Create folder
|
||||
String path = "/owncloud/tmp/" + temporalFolder;
|
||||
File sdCard = Environment.getExternalStorageDirectory();
|
||||
File folder = new File(sdCard.getAbsolutePath() + "/" + path);
|
||||
File privateFolder = getFilesDir();
|
||||
File folder = new File(privateFolder.getAbsolutePath() + "/" + path);
|
||||
folder.mkdirs();
|
||||
|
||||
DownloadRemoteFileOperation downloadOperation = new DownloadRemoteFileOperation(remoteFile.getRemotePath(), folder.getAbsolutePath());
|
||||
|
@ -6,8 +6,8 @@ dependencies {
|
||||
}
|
||||
|
||||
android {
|
||||
compileSdkVersion 19
|
||||
buildToolsVersion "20.0.0"
|
||||
compileSdkVersion 23
|
||||
buildToolsVersion "23.0.2"
|
||||
|
||||
sourceSets {
|
||||
main {
|
||||
|
@ -11,4 +11,4 @@
|
||||
#proguard.config=${sdk.dir}/tools/proguard/proguard-android.txt:proguard-project.txt
|
||||
|
||||
# Project target.
|
||||
target=android-19
|
||||
target=android-23
|
||||
|
@ -109,8 +109,6 @@ public class CopyFileTest extends ActivityInstrumentationTestCase2<TestActivity>
|
||||
|
||||
private static final String SRC_PATH_TO_FILE_6 = SRC_BASE_FOLDER + FILE6;
|
||||
|
||||
private static final String SRC_PATH_TO_FILE_7 = SRC_BASE_FOLDER + FILE7;
|
||||
|
||||
private static final String SRC_PATH_TO_NON_EXISTENT_FILE = SRC_BASE_FOLDER + NO_FILE;
|
||||
|
||||
private static final String SRC_PATH_TO_EMPTY_FOLDER = SRC_BASE_FOLDER + EMPTY;
|
||||
|
@ -94,9 +94,8 @@ public class DownloadFileTest extends RemoteTest {
|
||||
*/
|
||||
public void testDownloadFile() {
|
||||
RemoteOperationResult result = mActivity.downloadFile(
|
||||
new RemoteFile(mFullPath2Image),
|
||||
mActivity.getFilesDir().getAbsolutePath()
|
||||
);
|
||||
new RemoteFile(mFullPath2Image), ""
|
||||
);
|
||||
mDownloadedFilePath = mFullPath2Image;
|
||||
assertTrue(result.isSuccess());
|
||||
// TODO some checks involving the local file
|
||||
@ -107,9 +106,8 @@ public class DownloadFileTest extends RemoteTest {
|
||||
*/
|
||||
public void testDownloadFileSpecialChars() {
|
||||
RemoteOperationResult result = mActivity.downloadFile(
|
||||
new RemoteFile(mFullPath2ImageWitSpecialChars),
|
||||
mActivity.getFilesDir().getAbsolutePath()
|
||||
);
|
||||
new RemoteFile(mFullPath2ImageWitSpecialChars), ""
|
||||
);
|
||||
mDownloadedFilePath = mFullPath2ImageWitSpecialChars;
|
||||
assertTrue(result.isSuccess());
|
||||
// TODO some checks involving the local file
|
||||
@ -120,9 +118,8 @@ public class DownloadFileTest extends RemoteTest {
|
||||
*/
|
||||
public void testDownloadFileNotFound() {
|
||||
RemoteOperationResult result = mActivity.downloadFile(
|
||||
new RemoteFile(mFullPath2ImageNotFound),
|
||||
mActivity.getFilesDir().getAbsolutePath()
|
||||
);
|
||||
new RemoteFile(mFullPath2ImageNotFound), ""
|
||||
);
|
||||
assertFalse(result.isSuccess());
|
||||
}
|
||||
|
||||
|
@ -30,10 +30,9 @@ import java.security.GeneralSecurityException;
|
||||
import org.apache.commons.httpclient.ConnectTimeoutException;
|
||||
import org.apache.commons.httpclient.HttpException;
|
||||
import org.apache.commons.httpclient.methods.HeadMethod;
|
||||
import org.apache.commons.httpclient.params.HttpMethodParams;
|
||||
import org.apache.commons.httpclient.protocol.Protocol;
|
||||
import org.apache.commons.httpclient.protocol.ProtocolSocketFactory;
|
||||
import org.apache.http.HttpStatus;
|
||||
import org.apache.commons.httpclient.HttpStatus;
|
||||
import org.apache.jackrabbit.webdav.DavConstants;
|
||||
import org.apache.jackrabbit.webdav.client.methods.PropFindMethod;
|
||||
|
||||
|
@ -28,7 +28,6 @@ package com.owncloud.android.lib.test_project.test;
|
||||
|
||||
import java.io.File;
|
||||
import java.security.GeneralSecurityException;
|
||||
import java.util.Calendar;
|
||||
|
||||
import junit.framework.AssertionFailedError;
|
||||
|
||||
@ -207,8 +206,8 @@ public class UpdatePrivateShareTest extends RemoteTest {
|
||||
UpdateRemoteShareOperation updateNoShare = new UpdateRemoteShareOperation(
|
||||
mFileShare.getRemoteId()
|
||||
);
|
||||
updateShare.setPermissions(OCShare.READ_PERMISSION_FLAG); // minimum permissions
|
||||
result = updateShare.execute(mClient);
|
||||
updateNoShare.setPermissions(OCShare.READ_PERMISSION_FLAG); // minimum permissions
|
||||
result = updateNoShare.execute(mClient);
|
||||
assertFalse(result.isSuccess());
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user