Skip to content

Commit

Permalink
Merge branch 'release/1.5.14'
Browse files Browse the repository at this point in the history
  • Loading branch information
SailReal committed Apr 12, 2021
2 parents fea58a3 + 18dbb02 commit 71e872a
Show file tree
Hide file tree
Showing 139 changed files with 1,942 additions and 279 deletions.
2 changes: 2 additions & 0 deletions .github/FUNDING.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
github: [cryptomator]
custom: https://cryptomator.org/sponsors/
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,6 @@
[submodule "subsampling-scale-image-view"]
path = subsampling-scale-image-view
url = https://github.com/SailReal/subsampling-scale-image-view.git
[submodule "pcloud-sdk-java"]
path = pcloud-sdk-java
url = https://github.com/SailReal/pcloud-sdk-java
1 change: 1 addition & 0 deletions .idea/vcs.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

36 changes: 18 additions & 18 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -8,21 +8,21 @@ GEM
rubyzip (~> 2.0)
artifactory (3.0.15)
atomos (0.1.3)
aws-eventstream (1.1.0)
aws-partitions (1.428.0)
aws-sdk-core (3.112.0)
aws-eventstream (1.1.1)
aws-partitions (1.437.0)
aws-sdk-core (3.113.1)
aws-eventstream (~> 1, >= 1.0.2)
aws-partitions (~> 1, >= 1.239.0)
aws-sigv4 (~> 1.1)
jmespath (~> 1.0)
aws-sdk-kms (1.42.0)
aws-sdk-kms (1.43.0)
aws-sdk-core (~> 3, >= 3.112.0)
aws-sigv4 (~> 1.1)
aws-sdk-s3 (1.88.1)
aws-sdk-s3 (1.93.0)
aws-sdk-core (~> 3, >= 3.112.0)
aws-sdk-kms (~> 1)
aws-sigv4 (~> 1.1)
aws-sigv4 (1.2.2)
aws-sigv4 (1.2.3)
aws-eventstream (~> 1, >= 1.0.2)
babosa (1.0.4)
bcrypt_pbkdf (1.0.1)
Expand Down Expand Up @@ -51,8 +51,8 @@ GEM
faraday-net_http (1.0.1)
faraday_middleware (1.0.0)
faraday (~> 1.0)
fastimage (2.2.2)
fastlane (2.175.0)
fastimage (2.2.3)
fastlane (2.179.0)
CFPropertyList (>= 2.3, < 4.0.0)
addressable (>= 2.3, < 3.0.0)
artifactory (~> 3.0)
Expand Down Expand Up @@ -104,7 +104,7 @@ GEM
representable (~> 3.0)
retriable (>= 2.0, < 4.0)
signet (~> 0.12)
google-apis-core (0.2.1)
google-apis-core (0.3.0)
addressable (~> 2.5, >= 2.5.1)
googleauth (~> 0.14)
httpclient (>= 2.8.1, < 3.0)
Expand All @@ -114,25 +114,25 @@ GEM
rexml
signet (~> 0.14)
webrick
google-apis-iamcredentials_v1 (0.1.0)
google-apis-iamcredentials_v1 (0.2.0)
google-apis-core (~> 0.1)
google-apis-storage_v1 (0.2.0)
google-apis-storage_v1 (0.3.0)
google-apis-core (~> 0.1)
google-cloud-core (1.5.0)
google-cloud-core (1.6.0)
google-cloud-env (~> 1.0)
google-cloud-errors (~> 1.0)
google-cloud-env (1.4.0)
google-cloud-env (1.5.0)
faraday (>= 0.17.3, < 2.0)
google-cloud-errors (1.0.1)
google-cloud-storage (1.30.0)
google-cloud-errors (1.1.0)
google-cloud-storage (1.31.0)
addressable (~> 2.5)
digest-crc (~> 0.4)
google-apis-iamcredentials_v1 (~> 0.1)
google-apis-storage_v1 (~> 0.1)
google-cloud-core (~> 1.2)
googleauth (~> 0.9)
mini_mime (~> 1.0)
googleauth (0.15.1)
googleauth (0.16.0)
faraday (>= 0.17.3, < 2.0)
jwt (>= 1.4, < 3.0)
memoist (~> 0.16)
Expand All @@ -151,7 +151,7 @@ GEM
mime-types-data (~> 3.2015)
mime-types-data (3.2020.1104)
mini_magick (4.11.0)
mini_mime (1.0.2)
mini_mime (1.0.3)
multi_json (1.15.0)
multipart-post (2.0.0)
nanaimo (0.3.0)
Expand All @@ -173,7 +173,7 @@ GEM
ruby2_keywords (0.0.4)
rubyzip (2.3.0)
security (0.1.3)
signet (0.14.1)
signet (0.15.0)
addressable (~> 2.3)
faraday (>= 0.17.3, < 2.0)
jwt (>= 1.5, < 3.0)
Expand Down
8 changes: 4 additions & 4 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -3,19 +3,19 @@ apply from: 'buildsystem/dependencies.gradle'
apply plugin: "com.vanniktech.android.junit.jacoco"

buildscript {
ext.kotlin_version = '1.4.30'
ext.kotlin_version = '1.4.32'
repositories {
jcenter()
mavenCentral()
google()
}
dependencies {
classpath 'com.android.tools.build:gradle:4.1.2'
classpath 'com.android.tools.build:gradle:4.1.3'
classpath 'org.greenrobot:greendao-gradle-plugin:3.3.0'
classpath 'com.fernandocejas.frodo:frodo-plugin:0.8.3'
classpath 'com.vanniktech:gradle-android-junit-jacoco-plugin:0.16.0'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
classpath "de.mannodermaus.gradle.plugins:android-junit5:1.7.0.0"
classpath "de.mannodermaus.gradle.plugins:android-junit5:1.7.1.1"
}
}

Expand All @@ -42,7 +42,7 @@ allprojects {
ext {
androidApplicationId = 'org.cryptomator'
androidVersionCode = getVersionCode()
androidVersionName = '1.5.13'
androidVersionName = '1.5.14'
}
repositories {
mavenCentral()
Expand Down
20 changes: 10 additions & 10 deletions buildsystem/dependencies.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ ext {
javaxAnnotationVersion = '1.0'

// support lib
androidSupportAnnotationsVersion = '1.1.0'
androidSupportAnnotationsVersion = '1.2.0'
androidSupportAppcompatVersion = '1.2.0'
androidSupportDesignVersion = '1.3.0'

Expand All @@ -26,7 +26,7 @@ ext {
rxAndroidVersion = '2.1.1'
rxBindingVersion = '2.2.0'

daggerVersion = '2.32'
daggerVersion = '2.34'

gsonVersion = '2.8.6'

Expand All @@ -37,7 +37,7 @@ ext {

timberVersion = '4.7.1'

zxcvbnVersion = '1.3.6'
zxcvbnVersion = '1.4.0'

scaleImageViewVersion = '3.10.0'

Expand All @@ -51,13 +51,13 @@ ext {
// do not update to 1.4.0 until minsdk is 7.x (or desugaring works better) otherwise it will crash on 6.x
cryptolibVersion = '1.3.0'

dropboxVersion = '3.1.5'
dropboxVersion = '4.0.0'

googleApiServicesVersion = 'v3-rev197-1.25.0'
googlePlayServicesVersion = '19.0.0'
googleClientVersion = '1.31.2'
googleClientVersion = '1.31.4'

msgraphVersion = '2.8.0'
msgraphVersion = '2.10.0'
msaAuthVersion = '0.10.0'

commonsCodecVersion = '1.15'
Expand All @@ -69,8 +69,8 @@ ext {
jUnitVersion = '5.7.1'
jUnit4Version = '4.13.1'
assertJVersion = '1.7.1'
mockitoVersion = '3.7.7'
mockitoInlineVersion = '3.7.7'
mockitoVersion = '3.9.0'
mockitoInlineVersion = '3.9.0'
hamcrestVersion = '1.3'
dexmakerVersion = '1.0'
espressoVersion = '3.3.0'
Expand All @@ -81,11 +81,11 @@ ext {
uiautomatorVersion = '2.2.0'

androidxCoreVersion = '1.3.2'
androidxFragmentVersion = '1.3.0'
androidxFragmentVersion = '1.3.2'
androidxViewpagerVersion = '1.0.0'
androidxSwiperefreshVersion = '1.1.0'
androidxPreferenceVersion = '1.0.0' // 1.1.0 and 1.1.2 does have a bug with the text size
androidxRecyclerViewVersion = '1.1.0'
androidxRecyclerViewVersion = '1.2.0'
androidxDocumentfileVersion = '1.0.1'
androidxBiometricVersion = '1.1.0'
androidxTestCoreVersion = '1.3.0'
Expand Down
3 changes: 2 additions & 1 deletion data/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ android {
}

greendao {
schemaVersion 4
schemaVersion 5
}

configurations.all {
Expand All @@ -88,6 +88,7 @@ dependencies {
implementation project(':domain')
implementation project(':util')
implementation project(':msa-auth-for-android')
implementation project(':pcloud-sdk-java')

// cryptomator
implementation dependencies.cryptolib
Expand Down
2 changes: 1 addition & 1 deletion data/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,5 @@
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />

<application android:allowBackup="true" />
<application android:allowBackup="false" />
</manifest>
Original file line number Diff line number Diff line change
@@ -0,0 +1,112 @@
package org.cryptomator.data.cloud.pcloud;

import java.util.Arrays;
import java.util.HashSet;

public class PCloudApiError {

public static final HashSet<Integer> ignoreExistsSet = new HashSet<>( //
Arrays.asList( //
PCloudApiErrorCodes.COMPONENT_OF_PARENT_DIRECTORY_DOES_NOT_EXIST.getValue(), //
PCloudApiErrorCodes.FILE_NOT_FOUND.getValue(), //
PCloudApiErrorCodes.FILE_OR_FOLDER_NOT_FOUND.getValue(), //
PCloudApiErrorCodes.DIRECTORY_DOES_NOT_EXIST.getValue(), //
PCloudApiErrorCodes.INVALID_FILE_OR_FOLDER_NAME.getValue() //
));
public static final HashSet<Integer> ignoreMoveSet = new HashSet<>( //
Arrays.asList( //
PCloudApiErrorCodes.FILE_OR_FOLDER_ALREADY_EXISTS.getValue(), //
PCloudApiErrorCodes.COMPONENT_OF_PARENT_DIRECTORY_DOES_NOT_EXIST.getValue(), //
PCloudApiErrorCodes.FILE_NOT_FOUND.getValue(), //
PCloudApiErrorCodes.FILE_OR_FOLDER_NOT_FOUND.getValue(), //
PCloudApiErrorCodes.DIRECTORY_DOES_NOT_EXIST.getValue() //
) //
);

public static boolean isCloudNodeAlreadyExistsException(int errorCode) {
return errorCode == PCloudApiErrorCodes.FILE_OR_FOLDER_ALREADY_EXISTS.getValue();
}

public static boolean isFatalBackendException(int errorCode) {
return errorCode == PCloudApiErrorCodes.INTERNAL_UPLOAD_ERROR.getValue() //
|| errorCode == PCloudApiErrorCodes.INTERNAL_UPLOAD_ERROR.getValue() //
|| errorCode == PCloudApiErrorCodes.UPLOAD_NOT_FOUND.getValue() //
|| errorCode == PCloudApiErrorCodes.TRANSFER_NOT_FOUND.getValue();
}

public static boolean isForbiddenException(int errorCode) {
return errorCode == PCloudApiErrorCodes.ACCESS_DENIED.getValue();
}

public static boolean isNetworkConnectionException(int errorCode) {
return errorCode == PCloudApiErrorCodes.CONNECTION_BROKE.getValue();
}

public static boolean isNoSuchCloudFileException(int errorCode) {
return errorCode == PCloudApiErrorCodes.COMPONENT_OF_PARENT_DIRECTORY_DOES_NOT_EXIST.getValue() //
|| errorCode == PCloudApiErrorCodes.FILE_NOT_FOUND.getValue() //
|| errorCode == PCloudApiErrorCodes.FILE_OR_FOLDER_NOT_FOUND.getValue() //
|| errorCode == PCloudApiErrorCodes.DIRECTORY_DOES_NOT_EXIST.getValue();
}

public static boolean isWrongCredentialsException(int errorCode) {
return errorCode == PCloudApiErrorCodes.INVALID_ACCESS_TOKEN.getValue() //
|| errorCode == PCloudApiErrorCodes.ACCESS_TOKEN_REVOKED.getValue();
}

public static boolean isUnauthorizedException(int errorCode) {
return errorCode == PCloudApiErrorCodes.LOGIN_FAILED.getValue() //
|| errorCode == PCloudApiErrorCodes.LOGIN_REQUIRED.getValue() //
|| errorCode == PCloudApiErrorCodes.TOO_MANY_LOGIN_TRIES_FROM_IP.getValue();
}

public enum PCloudApiErrorCodes {
LOGIN_REQUIRED(1000), //
NO_FULL_PATH_OR_NAME_FOLDER_ID_PROVIDED(1001), //
NO_FULL_PATH_OR_FOLDER_ID_PROVIDED(1002), //
NO_FILE_ID_OR_PATH_PROVIDED(1004), //
INVALID_DATE_TIME_FORMAT(1013), //
NO_DESTINATION_PROVIDED(1016), //
INVALID_FOLDER_ID(1017), //
INVALID_DESTINATION(1037), //
PROVIDE_URL(1040), //
UPLOAD_NOT_FOUND(1900), //
TRANSFER_NOT_FOUND(1902), //
LOGIN_FAILED(2000), //
INVALID_FILE_OR_FOLDER_NAME(2001), //
COMPONENT_OF_PARENT_DIRECTORY_DOES_NOT_EXIST(2002), //
ACCESS_DENIED(2003), //
FILE_OR_FOLDER_ALREADY_EXISTS(2004), //
DIRECTORY_DOES_NOT_EXIST(2005), //
FOLDER_NOT_EMPTY(2006), //
CANNOT_DELETE_ROOT_FOLDER(2007), //
USER_OVER_QUOTA(2008), //
FILE_NOT_FOUND(2009), //
INVALID_PATH(2010), //
SHARED_FOLDER_IN_SHARED_FOLDER(2023), //
ACTIVE_SHARES_OR_SHAREREQUESTS_PRESENT(2028), //
CONNECTION_BROKE(2041), //
CANNOT_RENAME_ROOT_FOLDER(2042), //
CANNOT_MOVE_FOLDER_INTO_SUBFOLDER_OF_ITSELF(2043), //
FILE_OR_FOLDER_NOT_FOUND(2055), //
NO_FILE_UPLOAD_DETECTED(2088), //
INVALID_ACCESS_TOKEN(2094), //
ACCESS_TOKEN_REVOKED(2095), //
TRANSFER_OVER_QUOTA(2097), //
TARGET_FOLDER_DOES_NOT_EXIST(2208), //
TOO_MANY_LOGIN_TRIES_FROM_IP(4000), //
INTERNAL_ERROR(5000), //
INTERNAL_UPLOAD_ERROR(5001);

private final int value;

PCloudApiErrorCodes(final int newValue) {
value = newValue;
}

public int getValue() {
return value;
}
}

}
Loading

0 comments on commit 71e872a

Please sign in to comment.