Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
4deb914755 | ||
|
|
a6b90e4c99 | ||
|
|
a74e9af79b | ||
|
|
edd4afdc07 | ||
|
|
612fdfba12 | ||
|
|
c2618ba512 | ||
|
|
145c7c2570 | ||
|
|
0ec85602e7 | ||
|
|
858ecf8ddb | ||
|
|
a6b3895031 | ||
|
|
9e5c932574 | ||
|
|
03a219dbaf | ||
|
|
0d1c6357ca | ||
|
|
50a0eb7635 | ||
|
|
6ba61b0b70 | ||
|
|
ca9f4ecc56 | ||
|
|
7f8c416572 | ||
|
|
b70acc3cfd | ||
|
|
d402f3acdb | ||
|
|
8cba126120 | ||
|
|
6a5224788f | ||
|
|
3ec1c781d9 | ||
|
|
fec574b981 | ||
|
|
2fc9fa2807 | ||
|
|
a1ed32bf7b | ||
|
|
aef268c7d7 | ||
|
|
3b0f7bb0d4 | ||
|
|
86bc3a62a4 | ||
|
|
9eadf8ed4d | ||
|
|
3499350263 | ||
|
|
3145d45531 | ||
|
|
fde49354af | ||
|
|
6362bae384 | ||
|
|
23baa00e31 | ||
|
|
0578c7299c | ||
|
|
593d7e09fb | ||
|
|
58ef1b9a6d | ||
|
|
908a7e3d05 | ||
|
|
ddefc90ed8 | ||
|
|
4b6a7b0c59 | ||
|
|
ce7f23d282 | ||
|
|
cc7a22e8b7 | ||
|
|
0151b454a6 | ||
|
|
91af72e96c | ||
|
|
e0f7094c90 | ||
|
|
10d1f99526 | ||
|
|
a4f82c1df6 | ||
|
|
bf430c7265 | ||
|
|
c17763d2c6 | ||
|
|
288c4d81d0 | ||
|
|
9d2c134bb7 | ||
|
|
2271bb9f35 | ||
|
|
db29c5d677 | ||
|
|
b998db6394 | ||
|
|
3f73de97ef | ||
|
|
84122f24e4 | ||
|
|
93d1eeb8ce | ||
|
|
722823c9c4 | ||
|
|
60be5044ea | ||
|
|
ecefd79e91 | ||
|
|
528bd1f191 | ||
|
|
ed2bfb4599 | ||
|
|
020edd6500 | ||
|
|
26f565510d | ||
|
|
8aefbb1d58 | ||
|
|
fb4cb3421f | ||
|
|
cc16cd5075 | ||
|
|
25efb018de | ||
|
|
4fc858e987 | ||
|
|
97fe7e99e1 | ||
|
|
72483540ae | ||
|
|
3348df5cf8 | ||
|
|
58673046f2 | ||
|
|
62d234e059 | ||
|
|
a6a217cf9b | ||
|
|
6a0f80be69 | ||
|
|
23f18c3f6d | ||
|
|
c1ca00ec7b | ||
|
|
1e45fd05c1 | ||
|
|
101ad50866 | ||
|
|
24e07557ee | ||
|
|
28c97540f6 | ||
|
|
8f25744c93 | ||
|
|
e85d31cc1c | ||
|
|
ec37270835 | ||
|
|
79a6424d74 | ||
|
|
54d67a271e | ||
|
|
9f8916e5d9 | ||
|
|
e60810d66a | ||
|
|
e038907f76 | ||
|
|
fac406c2ec | ||
|
|
e7f4dea232 | ||
|
|
a1da79b441 | ||
|
|
5241e7308c | ||
|
|
d3f4305a87 | ||
|
|
f9c3e5e617 | ||
|
|
e5117680ac | ||
|
|
bf09016f26 | ||
|
|
07488b2e8e | ||
|
|
002c021319 | ||
|
|
535e7b737b | ||
|
|
c0d3da9368 | ||
|
|
ee6fa543a1 | ||
|
|
119916bb03 | ||
|
|
11045a2549 | ||
|
|
4b7a08757d | ||
|
|
29ba77473b | ||
|
|
3fd412d838 | ||
|
|
5e02399b1c | ||
|
|
0b6bc33285 | ||
|
|
a6b6e59d11 | ||
|
|
19cbac87c2 | ||
|
|
f0fb4a044c | ||
|
|
9bff11a311 | ||
|
|
0688788230 | ||
|
|
962de1d4c8 | ||
|
|
b194dee07b | ||
|
|
a23160b4e4 | ||
|
|
9f5dcd7116 | ||
|
|
4057b4ccd1 | ||
|
|
632396f0f7 | ||
|
|
9bf5602c2d | ||
|
|
2e628d8f62 | ||
|
|
a8c54accbd | ||
|
|
3679c7f2c2 | ||
|
|
1d9bbe9c55 | ||
|
|
27f706f257 | ||
|
|
e25410438f | ||
|
|
afb55de964 | ||
|
|
2997278f40 | ||
|
|
1795cde04f | ||
|
|
4ea5d865ce | ||
|
|
85604bbe85 | ||
|
|
1984c94a85 | ||
|
|
c8bcb9c1d8 | ||
|
|
71c112b0d4 | ||
|
|
9f73851e5f | ||
|
|
3b653e73f1 | ||
|
|
bc844bc023 | ||
|
|
72ba1d8d46 | ||
|
|
516934fc91 | ||
|
|
2804ff620f | ||
|
|
05d28f8872 | ||
|
|
0bbf14e92c | ||
|
|
eacb7e4dc0 | ||
|
|
7ba1a758b8 | ||
|
|
e12b988158 | ||
|
|
7cc0c88983 | ||
|
|
364883a6ec | ||
|
|
cae2070490 | ||
|
|
54e6dd4432 | ||
|
|
8b3f38c610 | ||
|
|
d57fdc8981 | ||
|
|
5a761b28f3 | ||
|
|
580b4203a2 | ||
|
|
dd64c29490 | ||
|
|
868922abcd | ||
|
|
83727c2834 | ||
|
|
866709070e | ||
|
|
760f573edb | ||
|
|
f15b2f9dc4 | ||
|
|
6558f45f6e | ||
|
|
2bbb2d386e | ||
|
|
40a4a27fe4 | ||
|
|
c4932a7046 | ||
|
|
4f732286bb | ||
|
|
741a9eea3e | ||
|
|
af2643eee2 | ||
|
|
9a73d3a712 | ||
|
|
6e49655948 | ||
|
|
2d61551c8a | ||
|
|
f1e4f35abe | ||
|
|
6e7bbf4178 | ||
|
|
347cf282ba | ||
|
|
5cfdf3089f | ||
|
|
b5ec4f4769 | ||
|
|
d87ea8dd3a | ||
|
|
c621738ae7 | ||
|
|
d98ce8454c | ||
|
|
8f9cb4f7a9 | ||
|
|
56ee9fdb43 | ||
|
|
b68e602800 | ||
|
|
71881954dc | ||
|
|
8ff8cd8be1 | ||
|
|
760bd4d79d | ||
|
|
ceb1d38c48 | ||
|
|
28a8672443 | ||
|
|
332f6f58ce | ||
|
|
62e06864a1 | ||
|
|
5d84351639 | ||
|
|
300eb6fd4c | ||
|
|
75c655a544 | ||
|
|
e00baeca70 | ||
|
|
9a331f76f0 | ||
|
|
2c2c8cd1b9 | ||
|
|
ee9b8b5380 | ||
|
|
12d5fc543f | ||
|
|
e74ed7f033 | ||
|
|
37c595bae9 | ||
|
|
b45f336aef | ||
|
|
b819e8081f | ||
|
|
cd3cee246b | ||
|
|
872bf3f95a | ||
|
|
10cd0fa39a | ||
|
|
d034ef94ad | ||
|
|
4f4e403fd7 | ||
|
|
9bf6a7be02 |
No files matched your search
@@ -1,5 +0,0 @@
|
||||
# SPDX-FileCopyrightText: 2026 Nextcloud GmbH and Nextcloud contributors
|
||||
# SPDX-License-Identifier: AGPL-3.0-or-later
|
||||
|
||||
exclude_paths:
|
||||
- "app/src/main/cpp/**"
|
||||
@@ -1,4 +1,4 @@
|
||||
FROM ubuntu:resolute@sha256:c098726dd9b9733f3e885f8de0ef375206a311b0a317eadc40d347b1115fb944
|
||||
FROM ubuntu:resolute@sha256:6a06111c3b0a8600feadb270aec771dc239bf407b25625f93f44ab00e11f4d3c
|
||||
|
||||
ARG DEBIAN_FRONTEND=noninteractive
|
||||
ENV ANDROID_HOME=/usr/lib/android-sdk
|
||||
|
||||
@@ -37,9 +37,9 @@ jobs:
|
||||
with:
|
||||
distribution: "temurin"
|
||||
java-version: 21
|
||||
- uses: gradle/actions/wrapper-validation@3f5f9adaf7d9fecd50b5935e54106014257a94e6 # v6.4.0
|
||||
- uses: gradle/actions/wrapper-validation@8da46b539cd8fe6ab27ca75128919a18d757604c # v6.4.1
|
||||
- name: Setup Gradle
|
||||
uses: gradle/actions/setup-gradle@3f5f9adaf7d9fecd50b5935e54106014257a94e6 # v6.4.0
|
||||
uses: gradle/actions/setup-gradle@8da46b539cd8fe6ab27ca75128919a18d757604c # v6.4.1
|
||||
- name: Build ${{ matrix.flavor }}
|
||||
run: |
|
||||
{
|
||||
|
||||
@@ -31,6 +31,6 @@ jobs:
|
||||
distribution: "temurin"
|
||||
java-version: 21
|
||||
- name: Setup Gradle
|
||||
uses: gradle/actions/setup-gradle@3f5f9adaf7d9fecd50b5935e54106014257a94e6 # v6.4.0
|
||||
uses: gradle/actions/setup-gradle@8da46b539cd8fe6ab27ca75128919a18d757604c # v6.4.1
|
||||
- name: Check ${{ matrix.task }}
|
||||
run: ./gradlew ${{ matrix.task }}
|
||||
@@ -1,6 +1,7 @@
|
||||
# synced from @nextcloud/android-config
|
||||
|
||||
# SPDX-FileCopyrightText: 2022-2024 Nextcloud GmbH and Nextcloud contributors
|
||||
# SPDX-FileCopyrightText: 2026 Alper Ozturk <[email protected]>
|
||||
# SPDX-FileCopyrightText: 2023-2024 Andy Scherzinger <[email protected]>
|
||||
# SPDX-FileCopyrightText: 2022 Tobias Kaminsky <[email protected]>
|
||||
# SPDX-FileCopyrightText: 2022 Álvaro Brey <[email protected]>
|
||||
@@ -20,10 +21,15 @@ on:
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
concurrency:
|
||||
group: codeql-${{ github.event.pull_request.number || github.run_id }}
|
||||
cancel-in-progress: true
|
||||
|
||||
jobs:
|
||||
analyze:
|
||||
name: Analyze
|
||||
runs-on: ubuntu-latest-max
|
||||
timeout-minutes: 90
|
||||
permissions:
|
||||
actions: read
|
||||
contents: read
|
||||
@@ -43,7 +49,7 @@ jobs:
|
||||
with:
|
||||
swap-size-gb: 10
|
||||
- name: Initialize CodeQL
|
||||
uses: github/codeql-action/init@6f2ac81f5cd81fe351a197ba0b00d91d03cd2aee # v4.39.0
|
||||
uses: github/codeql-action/init@9b3254085494b55a0f7c4c2b3d2d52cc712ce370 # v4.39.1
|
||||
with:
|
||||
languages: ${{ matrix.language }}
|
||||
- name: Set up JDK 21
|
||||
@@ -57,4 +63,4 @@ jobs:
|
||||
echo "org.gradle.jvmargs=-Xmx4g -XX:MaxMetaspaceSize=512m -XX:+HeapDumpOnOutOfMemoryError" > "$HOME/.gradle/gradle.properties"
|
||||
./gradlew --no-daemon assembleDebug
|
||||
- name: Perform CodeQL Analysis
|
||||
uses: github/codeql-action/analyze@6f2ac81f5cd81fe351a197ba0b00d91d03cd2aee # v4.39.0
|
||||
uses: github/codeql-action/analyze@9b3254085494b55a0f7c4c2b3d2d52cc712ce370 # v4.39.1
|
||||
@@ -17,7 +17,7 @@ concurrency:
|
||||
|
||||
jobs:
|
||||
detectWrongSettings:
|
||||
runs-on: ubuntu-24.04
|
||||
runs-on: ubuntu-26.04
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
||||
|
||||
@@ -17,7 +17,7 @@ concurrency:
|
||||
|
||||
jobs:
|
||||
test:
|
||||
runs-on: ubuntu-24.04
|
||||
runs-on: ubuntu-26.04
|
||||
services:
|
||||
server:
|
||||
image: ${{ matrix.server == 'stable22' && 'ghcr.io/nextcloud/continuous-integration-shallow-server-php8.0:1' || 'ghcr.io/nextcloud/continuous-integration-shallow-server-php8.3:latest' }}
|
||||
@@ -34,7 +34,7 @@ jobs:
|
||||
|
||||
- name: configure server
|
||||
run: |
|
||||
sudo apt-get update && sudo apt-get install unzip cpu-checker qemu-kvm --yes
|
||||
sudo apt-get update && sudo apt-get install unzip cpu-checker qemu-system-x86 --yes
|
||||
sudo chmod 666 /dev/kvm
|
||||
docker cp .github/workflows/configServer.sh server:/tmp/
|
||||
docker exec server chmod +x /tmp/configServer.sh
|
||||
@@ -50,12 +50,6 @@ jobs:
|
||||
distribution: "temurin"
|
||||
java-version: 21
|
||||
|
||||
- name: Enable KVM group perms
|
||||
run: |
|
||||
echo 'KERNEL=="kvm", GROUP="kvm", MODE="0666", OPTIONS+="static_node=kvm"' | sudo tee /etc/udev/rules.d/99-kvm4all.rules
|
||||
sudo udevadm control --reload-rules
|
||||
sudo udevadm trigger --name-match=kvm
|
||||
|
||||
- name: Configure gradle daemon
|
||||
run: |
|
||||
mkdir -p $HOME/.gradle
|
||||
|
||||
@@ -42,6 +42,6 @@ jobs:
|
||||
|
||||
# Upload the results to GitHub's code scanning dashboard.
|
||||
- name: "Upload to code-scanning"
|
||||
uses: github/codeql-action/upload-sarif@6f2ac81f5cd81fe351a197ba0b00d91d03cd2aee # v4.39.0
|
||||
uses: github/codeql-action/upload-sarif@9b3254085494b55a0f7c4c2b3d2d52cc712ce370 # v4.39.1
|
||||
with:
|
||||
sarif_file: results.sarif
|
||||
@@ -37,7 +37,7 @@ jobs:
|
||||
run: scripts/deleteOldComments.sh "test" "Unit" ${{github.event.number}}
|
||||
|
||||
- name: Setup Gradle
|
||||
uses: gradle/actions/setup-gradle@3f5f9adaf7d9fecd50b5935e54106014257a94e6 # v6.4.0
|
||||
uses: gradle/actions/setup-gradle@8da46b539cd8fe6ab27ca75128919a18d757604c # v6.4.1
|
||||
|
||||
- name: Run unit tests with coverage
|
||||
run: ./gradlew jacocoTestGplayDebugUnitTest
|
||||
|
||||
@@ -60,6 +60,7 @@ build
|
||||
/gradle.properties
|
||||
.attach_pid*
|
||||
fastlane/Fastfile
|
||||
fastlane/ruby
|
||||
*.hprof
|
||||
|
||||
# NDK / C++
|
||||
|
||||
@@ -1,10 +1,4 @@
|
||||
# Autogenerated by fastlane
|
||||
#
|
||||
# Ensure this file is checked in to source control!
|
||||
|
||||
source "https://rubygems.org"
|
||||
|
||||
gem 'fastlane'
|
||||
|
||||
plugins_path = File.join(File.dirname(__FILE__), 'fastlane', 'Pluginfile')
|
||||
eval_gemfile(plugins_path) if File.exist?(plugins_path)
|
||||
gem "fastlane"
|
||||
gem "abbrev"
|
||||
+44
-38
@@ -7,10 +7,10 @@ GEM
|
||||
public_suffix (>= 2.0.2, < 8.0)
|
||||
artifactory (3.0.17)
|
||||
atomos (0.1.3)
|
||||
aws-eventstream (1.4.0)
|
||||
aws-partitions (1.1296.0)
|
||||
aws-sdk-core (3.257.0)
|
||||
aws-eventstream (~> 1, >= 1.3.0)
|
||||
aws-eventstream (1.4.1)
|
||||
aws-partitions (1.1299.1)
|
||||
aws-sdk-core (3.262.0)
|
||||
aws-eventstream (~> 1, >= 1.4.1)
|
||||
aws-partitions (~> 1, >= 1.992.0)
|
||||
aws-sigv4 (~> 1.9)
|
||||
base64
|
||||
@@ -18,11 +18,11 @@ GEM
|
||||
jmespath (~> 1, >= 1.6.1)
|
||||
logger
|
||||
rexml (~> 3.4, >= 3.4.2)
|
||||
aws-sdk-kms (1.132.0)
|
||||
aws-sdk-core (~> 3, >= 3.256.0)
|
||||
aws-sdk-kms (1.137.0)
|
||||
aws-sdk-core (~> 3, >= 3.262.0)
|
||||
aws-sigv4 (~> 1.5)
|
||||
aws-sdk-s3 (1.233.2)
|
||||
aws-sdk-core (~> 3, >= 3.256.0)
|
||||
aws-sdk-s3 (1.236.0)
|
||||
aws-sdk-core (~> 3, >= 3.262.0)
|
||||
aws-sdk-kms (~> 1)
|
||||
aws-sigv4 (~> 1.5)
|
||||
aws-sigv4 (1.12.1)
|
||||
@@ -30,14 +30,14 @@ GEM
|
||||
babosa (1.0.4)
|
||||
base64 (0.3.0)
|
||||
benchmark (0.5.0)
|
||||
bigdecimal (3.3.1)
|
||||
bigdecimal (4.1.3)
|
||||
cgi (0.5.2)
|
||||
claide (1.1.0)
|
||||
colored (1.2)
|
||||
colored2 (3.1.2)
|
||||
commander (4.6.0)
|
||||
highline (~> 2.0.0)
|
||||
csv (3.3.6)
|
||||
csv (3.3.7)
|
||||
declarative (0.0.20)
|
||||
digest-crc (0.7.0)
|
||||
rake (>= 12.0.0, < 14.0.0)
|
||||
@@ -45,9 +45,8 @@ GEM
|
||||
dotenv (2.8.1)
|
||||
emoji_regex (3.2.3)
|
||||
erb (6.0.7)
|
||||
excon (1.7.3)
|
||||
logger
|
||||
faraday (2.15.0)
|
||||
excon (1.9.0)
|
||||
faraday (2.15.1)
|
||||
faraday-net_http (>= 2.0, < 3.6)
|
||||
json
|
||||
logger
|
||||
@@ -58,11 +57,12 @@ GEM
|
||||
faraday (>= 1, < 3)
|
||||
faraday-multipart (1.2.0)
|
||||
multipart-post (~> 2.0)
|
||||
faraday-net_http (2.1.0)
|
||||
faraday-net_http (3.5.0)
|
||||
net-http (~> 0.5)
|
||||
faraday-retry (2.4.0)
|
||||
faraday (~> 2.0)
|
||||
fastimage (2.4.1)
|
||||
fastlane (2.241.1)
|
||||
fastimage (2.4.3)
|
||||
fastlane (2.241.2)
|
||||
CFPropertyList (>= 2.3, < 5.0.0)
|
||||
abbrev (~> 0.1)
|
||||
addressable (>= 2.9.0, < 3.0.0)
|
||||
@@ -117,25 +117,24 @@ GEM
|
||||
xcodeproj (>= 1.13.0, < 2.0.0)
|
||||
xcpretty (~> 0.4.1)
|
||||
xcpretty-travis-formatter (>= 0.0.3, < 2.0.0)
|
||||
fastlane-plugin-huawei_appgallery_connect (1.0.31)
|
||||
cgi
|
||||
fastlane-sirp (1.1.0)
|
||||
gh_inspector (1.1.3)
|
||||
google-apis-androidpublisher_v3 (0.109.0)
|
||||
google-apis-androidpublisher_v3 (0.110.0)
|
||||
google-apis-core (>= 0.15.0, < 2.a)
|
||||
google-apis-core (0.18.0)
|
||||
addressable (~> 2.5, >= 2.5.1)
|
||||
googleauth (~> 1.9)
|
||||
httpclient (>= 2.8.3, < 3.a)
|
||||
mini_mime (~> 1.0)
|
||||
mutex_m
|
||||
google-apis-core (1.4.0)
|
||||
addressable (~> 2.9)
|
||||
faraday (~> 2.13)
|
||||
faraday-follow_redirects (~> 0.3)
|
||||
googleauth (~> 1.14)
|
||||
mini_mime (~> 1.1)
|
||||
multi_json (~> 1.11)
|
||||
representable (~> 3.0)
|
||||
retriable (>= 2.0, < 4.a)
|
||||
retriable (>= 3.1, < 5.0)
|
||||
google-apis-iamcredentials_v1 (0.28.0)
|
||||
google-apis-core (>= 0.15.0, < 2.a)
|
||||
google-apis-playcustomapp_v1 (0.18.0)
|
||||
google-apis-core (>= 0.15.0, < 2.a)
|
||||
google-apis-storage_v1 (0.69.0)
|
||||
google-apis-storage_v1 (0.70.0)
|
||||
google-apis-core (>= 0.15.0, < 2.a)
|
||||
google-cloud-core (1.9.0)
|
||||
google-cloud-env (>= 1.0, < 3.a)
|
||||
@@ -154,7 +153,7 @@ GEM
|
||||
googleauth (~> 1.9)
|
||||
mini_mime (~> 1.0)
|
||||
google-logging-utils (0.2.1)
|
||||
googleauth (1.17.5)
|
||||
googleauth (1.17.6)
|
||||
faraday (>= 1.0, < 3.a)
|
||||
google-cloud-env (~> 2.2)
|
||||
google-logging-utils (~> 0.1)
|
||||
@@ -165,9 +164,7 @@ GEM
|
||||
highline (2.0.3)
|
||||
http-cookie (1.1.6)
|
||||
domain_name (~> 0.5)
|
||||
httpclient (2.9.0)
|
||||
mutex_m
|
||||
io-console (0.9.4)
|
||||
io-console (0.9.5)
|
||||
irb (1.18.0)
|
||||
pp (>= 0.6.0)
|
||||
prism (>= 1.3.0)
|
||||
@@ -175,7 +172,7 @@ GEM
|
||||
reline (>= 0.4.2)
|
||||
jmespath (1.6.2)
|
||||
json (2.21.2)
|
||||
jwt (2.10.3)
|
||||
jwt (3.3.0)
|
||||
base64
|
||||
logger (1.7.0)
|
||||
mini_magick (4.13.2)
|
||||
@@ -185,6 +182,11 @@ GEM
|
||||
mutex_m (0.3.0)
|
||||
nanaimo (0.4.0)
|
||||
naturally (2.3.0)
|
||||
net-http (0.10.0)
|
||||
net-protocol (>= 0.3.0)
|
||||
uri (>= 0.11.1)
|
||||
net-protocol (0.4.0)
|
||||
timeout
|
||||
nkf (0.3.0)
|
||||
optparse (0.8.1)
|
||||
os (1.1.4)
|
||||
@@ -194,8 +196,8 @@ GEM
|
||||
prettyprint
|
||||
prettyprint (0.2.1)
|
||||
prism (1.9.0)
|
||||
pstore (0.2.1)
|
||||
public_suffix (6.0.2)
|
||||
pstore (0.3.0)
|
||||
public_suffix (7.0.5)
|
||||
rake (13.4.2)
|
||||
rbs (4.2.0)
|
||||
logger
|
||||
@@ -212,11 +214,11 @@ GEM
|
||||
declarative (< 0.1.0)
|
||||
trailblazer-option (>= 0.1.1, < 0.2.0)
|
||||
uber (< 0.2.0)
|
||||
retriable (3.8.0)
|
||||
retriable (4.2.0)
|
||||
rexml (3.4.4)
|
||||
rouge (3.28.0)
|
||||
rubyzip (3.7.0)
|
||||
security (0.3.0)
|
||||
security (0.4.0)
|
||||
signet (0.22.1)
|
||||
addressable (~> 2.8)
|
||||
faraday (>= 0.17.5, < 3.a)
|
||||
@@ -227,6 +229,7 @@ GEM
|
||||
terminal-notifier (3.1.0)
|
||||
terminal-table (4.0.0)
|
||||
unicode-display_width (>= 1.1.1, < 4)
|
||||
timeout (0.6.1)
|
||||
trailblazer-option (0.1.2)
|
||||
tsort (0.2.0)
|
||||
tty-cursor (0.7.1)
|
||||
@@ -234,7 +237,10 @@ GEM
|
||||
tty-spinner (0.9.3)
|
||||
tty-cursor (~> 0.7)
|
||||
uber (0.1.0)
|
||||
unicode-display_width (2.6.0)
|
||||
unicode-display_width (3.3.0)
|
||||
unicode-emoji (~> 4.3)
|
||||
unicode-emoji (4.3.0)
|
||||
uri (1.1.2)
|
||||
word_wrap (1.0.0)
|
||||
xcodeproj (1.28.1)
|
||||
CFPropertyList (>= 2.3.3, < 4.0)
|
||||
@@ -254,8 +260,8 @@ PLATFORMS
|
||||
x86_64-linux
|
||||
|
||||
DEPENDENCIES
|
||||
abbrev
|
||||
fastlane
|
||||
fastlane-plugin-huawei_appgallery_connect
|
||||
|
||||
BUNDLED WITH
|
||||
2.5.4
|
||||
@@ -4,7 +4,7 @@
|
||||
-->
|
||||
# [Nextcloud](https://nextcloud.com) Android app :iphone:
|
||||
|
||||
[](https://api.reuse.software/info/github.com/nextcloud/android) [](https://drone.nextcloud.com/nextcloud/android) [](https://app.codacy.com/gh/nextcloud/android/dashboard?utm_source=gh&utm_medium=referral&utm_content=&utm_campaign=Badge_grade) [](https://github.com/nextcloud/android/releases/latest)
|
||||
[](https://api.reuse.software/info/github.com/nextcloud/android) [](https://drone.nextcloud.com/nextcloud/android) [](https://github.com/nextcloud/android/releases/latest)
|
||||
|
||||
[<img src="https://play.google.com/intl/en_us/badges/images/generic/en_badge_web_generic.png"
|
||||
alt="Download from Google Play"
|
||||
|
||||
@@ -6,7 +6,6 @@
|
||||
|
||||
[](https://api.reuse.software/info/github.com/nextcloud/android)
|
||||
[](https://drone.nextcloud.com/nextcloud/android)
|
||||
[](https://app.codacy.com/gh/nextcloud/android/dashboard)
|
||||
[](https://github.com/nextcloud/android/releases/latest)
|
||||
|
||||
[<img src="https://play.google.com/intl/en_us/badges/images/generic/en_badge_web_generic.png" alt="تحميل من Google Play" height="80">](https://play.google.com/store/apps/details?id=com.nextcloud.client)
|
||||
|
||||
+18
-22
@@ -18,6 +18,12 @@ val shotTest = System.getenv("SHOT_TEST") == "true"
|
||||
val ciBuild = System.getenv("CI") == "true"
|
||||
val perfAnalysis = project.hasProperty("perfAnalysis")
|
||||
|
||||
val allAbis = listOf("armeabi-v7a", "arm64-v8a", "x86", "x86_64")
|
||||
val localDebugAbis = when (System.getProperty("os.arch")) {
|
||||
"aarch64", "arm64" -> listOf("arm64-v8a")
|
||||
else -> listOf("arm64-v8a", "x86_64")
|
||||
}
|
||||
|
||||
plugins {
|
||||
alias(libs.plugins.android.application)
|
||||
alias(libs.plugins.kotlin.compose)
|
||||
@@ -66,12 +72,6 @@ configurations.configureEach {
|
||||
}
|
||||
}
|
||||
|
||||
// semantic versioning for version code
|
||||
val versionMajor = 35
|
||||
val versionMinor = 1
|
||||
val versionPatch = 0
|
||||
val versionBuild = 50 // 0-50=Alpha / 51-98=RC / 90-99=stable
|
||||
|
||||
val ndkEnv = buildMap {
|
||||
file("${project.rootDir}/ndk.env").readLines().forEach {
|
||||
val (key, value) = it.split("=")
|
||||
@@ -107,12 +107,12 @@ android {
|
||||
)
|
||||
applicationId = "com.nextcloud.client"
|
||||
minSdk = 28
|
||||
targetSdk = 36
|
||||
compileSdk = 37
|
||||
|
||||
ndk {
|
||||
abiFilters += listOf("armeabi-v7a", "arm64-v8a", "x86", "x86_64")
|
||||
}
|
||||
targetSdk = 36
|
||||
// mayor.minor.hotfix.increment (for increment: 01-50=Alpha / 51-89=RC / 90-99=stable)
|
||||
// xx .xxx .xx .xx
|
||||
versionCode = 350010050
|
||||
versionName = "35.1.0 Alpha 51"
|
||||
|
||||
buildConfigField("boolean", "CI", ciBuild.toString())
|
||||
buildConfigField("boolean", "RUNTIME_PERF_ANALYSIS", perfAnalysis.toString())
|
||||
@@ -121,13 +121,6 @@ android {
|
||||
testInstrumentationRunner = if (shotTest) "com.karumi.shot.ShotTestRunner"
|
||||
else "com.nextcloud.client.TestRunner"
|
||||
|
||||
versionCode = versionMajor * 10000000 + versionMinor * 10000 + versionPatch * 100 + versionBuild
|
||||
versionName = when {
|
||||
versionBuild > 89 -> "${versionMajor}.${versionMinor}.${versionPatch}"
|
||||
versionBuild > 50 -> "${versionMajor}.${versionMinor}.${versionPatch} RC" + (versionBuild - 50)
|
||||
else -> "${versionMajor}.${versionMinor}.${versionPatch} Alpha" + (versionBuild + 1)
|
||||
}
|
||||
|
||||
// adapt structure from Eclipse to Gradle/Android Studio expectations;
|
||||
// see http://tools.android.com/tech-docs/new-build-system/user-guide#TOC-Configuring-the-Structure
|
||||
|
||||
@@ -139,11 +132,17 @@ android {
|
||||
enable = true
|
||||
}
|
||||
buildConfigField("String", "NC_TEST_SERVER_DATA_STRING", "\"\"")
|
||||
ndk {
|
||||
abiFilters += allAbis
|
||||
}
|
||||
}
|
||||
debug {
|
||||
enableUnitTestCoverage = project.hasProperty("coverage")
|
||||
enableAndroidTestCoverage = project.hasProperty("coverage")
|
||||
resConfigs("xxxhdpi")
|
||||
ndk {
|
||||
abiFilters += if (ciBuild) allAbis else localDebugAbis
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -194,7 +193,6 @@ android {
|
||||
|
||||
buildFeatures {
|
||||
buildConfig = true
|
||||
dataBinding = true
|
||||
viewBinding = true
|
||||
aidl = true
|
||||
compose = true
|
||||
@@ -319,10 +317,7 @@ tasks.withType<SpotBugsTask>().configureEach {
|
||||
}
|
||||
}
|
||||
|
||||
// Run the compiler as a separate process
|
||||
tasks.withType<JavaCompile>().configureEach {
|
||||
options.isFork = true
|
||||
|
||||
// Enable Incremental Compilation
|
||||
options.isIncremental = true
|
||||
}
|
||||
@@ -404,6 +399,7 @@ dependencies {
|
||||
|
||||
// region Lifecycle
|
||||
implementation(libs.lifecycle.viewmodel.ktx)
|
||||
implementation(libs.lifecycle.process)
|
||||
implementation(libs.lifecycle.service)
|
||||
implementation(libs.lifecycle.runtime.ktx)
|
||||
// endregion
|
||||
|
||||
+10
-10
@@ -53,9 +53,9 @@ complexity:
|
||||
active: false
|
||||
threshold: 10
|
||||
includeStaticDeclarations: false
|
||||
ComplexMethod:
|
||||
CyclomaticComplexMethod:
|
||||
active: true
|
||||
threshold: 10
|
||||
threshold: 15
|
||||
ignoreSingleWhenExpression: false
|
||||
ignoreSimpleWhenEntries: false
|
||||
excludes: ['**/androidTest/**']
|
||||
@@ -67,10 +67,10 @@ complexity:
|
||||
threshold: 600
|
||||
LongMethod:
|
||||
active: true
|
||||
threshold: 60
|
||||
threshold: 120
|
||||
excludes: ['**/androidTest/**']
|
||||
LongParameterList:
|
||||
active: true
|
||||
active: false
|
||||
functionThreshold: 7
|
||||
constructorThreshold: 6
|
||||
ignoreDefaultParameters: false
|
||||
@@ -87,7 +87,7 @@ complexity:
|
||||
excludeStringsWithLessThan5Characters: true
|
||||
ignoreStringsRegex: '$^'
|
||||
TooManyFunctions:
|
||||
active: true
|
||||
active: false
|
||||
thresholdInFiles: 15
|
||||
thresholdInClasses: 15
|
||||
thresholdInInterfaces: 15
|
||||
@@ -158,7 +158,7 @@ exceptions:
|
||||
ThrowingNewInstanceOfSameException:
|
||||
active: false
|
||||
TooGenericExceptionCaught:
|
||||
active: true
|
||||
active: false
|
||||
exceptionNames:
|
||||
- ArrayIndexOutOfBoundsException
|
||||
- Error
|
||||
@@ -170,7 +170,7 @@ exceptions:
|
||||
- Throwable
|
||||
allowedExceptionNameRegex: "^(_|(ignore|expected).*)"
|
||||
TooGenericExceptionThrown:
|
||||
active: true
|
||||
active: false
|
||||
exceptionNames:
|
||||
- Error
|
||||
- Exception
|
||||
@@ -226,7 +226,7 @@ naming:
|
||||
active: true
|
||||
packagePattern: '^[a-z]+(\.[a-z][A-Za-z0-9]*)*$'
|
||||
TopLevelPropertyNaming:
|
||||
active: true
|
||||
active: false
|
||||
constantPattern: '[A-Z][_A-Z0-9]*'
|
||||
propertyPattern: '[A-Za-z][_A-Za-z0-9]*'
|
||||
privatePropertyPattern: '(_)?[A-Za-z][A-Za-z0-9]*'
|
||||
@@ -346,7 +346,7 @@ style:
|
||||
NestedClassesVisibility:
|
||||
active: false
|
||||
NewLineAtEndOfFile:
|
||||
active: true
|
||||
active: false
|
||||
NoTabs:
|
||||
active: false
|
||||
OptionalAbstractKeyword:
|
||||
@@ -362,7 +362,7 @@ style:
|
||||
RedundantVisibilityModifierRule:
|
||||
active: false
|
||||
ReturnCount:
|
||||
active: true
|
||||
active: false
|
||||
max: 2
|
||||
excludedFunctions: [equals]
|
||||
excludeLabeled: false
|
||||
|
||||
@@ -90,6 +90,11 @@
|
||||
<ignore path="**/appcompat-1.**/**/lint.jar" />
|
||||
</issue>
|
||||
|
||||
<!-- Lint reads abiFilters as source text and cannot resolve allAbis; local debug builds skip x86 on purpose. -->
|
||||
<issue id="ChromeOsAbiSupport">
|
||||
<ignore path="build.gradle.kts" />
|
||||
</issue>
|
||||
|
||||
<issue id="Aligned16KB">
|
||||
<ignore path="**/arm64-v8a/libmockkjvmtiagent.so" />
|
||||
</issue>
|
||||
|
||||
@@ -16,7 +16,6 @@ import java.util.TreeMap
|
||||
*
|
||||
* The implementation is not thread-safe.
|
||||
*/
|
||||
@Suppress("TooManyFunctions")
|
||||
class MockSharedPreferences : SharedPreferences {
|
||||
|
||||
class MockEditor(val store: MutableMap<String?, Any?>) : SharedPreferences.Editor {
|
||||
|
||||
@@ -0,0 +1,138 @@
|
||||
/*
|
||||
* Nextcloud - Android Client
|
||||
*
|
||||
* SPDX-FileCopyrightText: 2026 Daniele Verducci <[email protected]>
|
||||
* SPDX-FileCopyrightText: 2026 Nextcloud GmbH and Nextcloud contributors
|
||||
* SPDX-License-Identifier: AGPL-3.0-or-later
|
||||
*/
|
||||
package com.nextcloud.extensions
|
||||
|
||||
import android.graphics.Bitmap
|
||||
import com.nextcloud.utils.extensions.areImageDimensionsSame
|
||||
import com.owncloud.android.lib.resources.files.model.ImageDimension
|
||||
import com.owncloud.android.lib.resources.files.model.RemoteFile
|
||||
import org.junit.After
|
||||
import org.junit.Assert.assertFalse
|
||||
import org.junit.Assert.assertTrue
|
||||
import org.junit.Before
|
||||
import org.junit.Test
|
||||
import java.io.File
|
||||
import java.io.OutputStream
|
||||
import java.nio.file.Files
|
||||
import java.nio.file.Path
|
||||
import kotlin.io.path.exists
|
||||
|
||||
class RemoteFileExtensionsImageTest {
|
||||
|
||||
private lateinit var tempDir: Path
|
||||
private val remoteFileWithDimensions = RemoteFile().apply {
|
||||
mimeType = "image/jpeg"
|
||||
imageDimension = ImageDimension(IMAGE_WIDTH.toFloat(), IMAGE_HEIGHT.toFloat())
|
||||
}
|
||||
private val remoteFileWithoutDimensions = RemoteFile().apply {
|
||||
mimeType = "image/jpeg"
|
||||
imageDimension = null
|
||||
}
|
||||
|
||||
@Test
|
||||
fun testAreImageDimensionsSameWhenLocalFileIsNotImage_ShouldReturnTrue() {
|
||||
// local not an image
|
||||
assertTrue(
|
||||
"comparing with non-image",
|
||||
remoteFileWithDimensions.areImageDimensionsSame(getPath(TEXT_FILENAME).toString())
|
||||
)
|
||||
}
|
||||
|
||||
@Test
|
||||
fun testAreImageDimensionsSame_ShouldReturnTrue() {
|
||||
// same dimensions
|
||||
assertTrue(
|
||||
"comparing with same-size image",
|
||||
remoteFileWithDimensions.areImageDimensionsSame(getPath(IMAGE_FILENAME).toString())
|
||||
)
|
||||
}
|
||||
|
||||
@Test
|
||||
fun testAreImageDimensionsSame_ShouldReturnFalse() {
|
||||
// different dimensions
|
||||
val biggerRemoteImage = RemoteFile().apply {
|
||||
mimeType = "image/jpeg"
|
||||
imageDimension = ImageDimension((IMAGE_WIDTH * 2).toFloat(), IMAGE_HEIGHT.toFloat())
|
||||
}
|
||||
assertFalse(
|
||||
"comparing with different-size image",
|
||||
biggerRemoteImage.areImageDimensionsSame(getPath(IMAGE_FILENAME).toString())
|
||||
)
|
||||
}
|
||||
|
||||
@Test
|
||||
fun testAreImageDimensionsSameWhenLocalFileHasNoDimensions_ShouldReturnTrue() {
|
||||
// local file with null dimensions
|
||||
assertTrue(
|
||||
"comparing null-dimensions local file with valid remote file",
|
||||
remoteFileWithoutDimensions.areImageDimensionsSame(getPath(TEXT_FILENAME).toString())
|
||||
)
|
||||
}
|
||||
|
||||
@Test
|
||||
fun testAreImageDimensionsSameWhenRemoteFileHasNoDimensions_ShouldReturnTrue() {
|
||||
// remote file with null dimensions
|
||||
assertTrue(
|
||||
"comparing with null-dimensions remote file",
|
||||
remoteFileWithoutDimensions.areImageDimensionsSame(getPath(IMAGE_FILENAME).toString())
|
||||
)
|
||||
}
|
||||
|
||||
@Test
|
||||
fun testAreImageDimensionsSameWhenBothFilesHaveNoDimensions_ShouldReturnTrue() {
|
||||
// both files with null dimensions
|
||||
assertTrue(
|
||||
"comparing null-dimensions local file with null-dimensions remote file",
|
||||
remoteFileWithoutDimensions.areImageDimensionsSame(getPath(TEXT_FILENAME).toString())
|
||||
)
|
||||
}
|
||||
|
||||
@After
|
||||
fun cleanup() {
|
||||
val tf = File(getPath(TEXT_FILENAME).toUri())
|
||||
val imgf = File(getPath(IMAGE_FILENAME).toUri())
|
||||
tf.delete()
|
||||
imgf.delete()
|
||||
}
|
||||
|
||||
@Before
|
||||
fun setup() {
|
||||
tempDir = Files.createTempDirectory(TMP_DIR)
|
||||
assertTrue("Temp directory should exist", tempDir.exists())
|
||||
|
||||
createImageFile()
|
||||
createTextFile()
|
||||
}
|
||||
|
||||
private fun getPath(filename: String): Path = tempDir.resolve("test_$filename")
|
||||
|
||||
private fun createImageFile() {
|
||||
val bitmap = Bitmap.createBitmap(IMAGE_WIDTH, IMAGE_HEIGHT, Bitmap.Config.ARGB_8888)
|
||||
val imagePath = getPath(IMAGE_FILENAME)
|
||||
|
||||
Files.newOutputStream(imagePath).use { out: OutputStream ->
|
||||
bitmap.compress(Bitmap.CompressFormat.JPEG, 90, out)
|
||||
}
|
||||
|
||||
assertTrue(imagePath.exists())
|
||||
}
|
||||
|
||||
private fun createTextFile() {
|
||||
val f = File(getPath(TEXT_FILENAME).toUri())
|
||||
f.writeText("Lorem ipsum")
|
||||
}
|
||||
|
||||
companion object {
|
||||
val TMP_DIR = "remoteFileExtensionsTest"
|
||||
val TEXT_FILENAME = "text.txt"
|
||||
val IMAGE_FILENAME = "image.jpg"
|
||||
|
||||
val IMAGE_WIDTH = 123
|
||||
val IMAGE_HEIGHT = 45
|
||||
}
|
||||
}
|
||||
@@ -11,7 +11,6 @@ import junit.framework.TestCase.assertFalse
|
||||
import junit.framework.TestCase.assertTrue
|
||||
import org.junit.Test
|
||||
|
||||
@Suppress("TooManyFunctions")
|
||||
class StringExtensionTests {
|
||||
@Test
|
||||
fun testIsNotBlankAndEqualsWhenGivenBothStringsAreNull() {
|
||||
|
||||
@@ -22,7 +22,7 @@ import org.junit.Test
|
||||
import java.io.File
|
||||
import kotlin.random.Random
|
||||
|
||||
@Suppress("TooManyFunctions", "MagicNumber")
|
||||
@Suppress("MagicNumber")
|
||||
class FileDeletionTests : AbstractIT() {
|
||||
|
||||
private val createdFilePaths = mutableListOf<String>()
|
||||
|
||||
@@ -18,7 +18,6 @@ fun withSelectedText(expected: String): Matcher<View> = object : TypeSafeMatcher
|
||||
description.appendText("with selected text \"$expected\"")
|
||||
}
|
||||
|
||||
@Suppress("ReturnCount")
|
||||
override fun matchesSafely(view: View): Boolean {
|
||||
if (view !is TextView) return false
|
||||
val text = view.text?.toString() ?: ""
|
||||
|
||||
@@ -27,7 +27,6 @@ class RetryTestRule(val retryCount: Int = defaultRetryValue) : TestRule {
|
||||
|
||||
override fun apply(base: Statement, description: Description): Statement = statement(base, description)
|
||||
|
||||
@Suppress("TooGenericExceptionCaught") // and this exactly what we want here
|
||||
private fun statement(base: Statement, description: Description): Statement {
|
||||
return object : Statement() {
|
||||
|
||||
|
||||
@@ -18,7 +18,6 @@ import com.owncloud.android.lib.resources.status.OCCapability
|
||||
import org.junit.Before
|
||||
import org.junit.Test
|
||||
|
||||
@Suppress("TooManyFunctions")
|
||||
@SinceServer(majorVersion = 30)
|
||||
class AutoRenameTests : AbstractOnServerIT() {
|
||||
|
||||
|
||||
@@ -12,7 +12,6 @@ import junit.framework.TestCase.assertFalse
|
||||
import junit.framework.TestCase.assertTrue
|
||||
import org.junit.Test
|
||||
|
||||
@Suppress("TooManyFunctions")
|
||||
class FileExtensionTest {
|
||||
|
||||
@Test
|
||||
|
||||
@@ -15,7 +15,6 @@ import org.junit.Test
|
||||
import java.io.File
|
||||
import java.nio.file.Files
|
||||
|
||||
@Suppress("TooManyFunctions")
|
||||
class FileHelperTest {
|
||||
|
||||
private lateinit var testDirectory: File
|
||||
|
||||
@@ -21,7 +21,6 @@ import org.junit.Assert.assertTrue
|
||||
import org.junit.Before
|
||||
import org.junit.Test
|
||||
|
||||
@Suppress("TooManyFunctions")
|
||||
class FileNameValidatorTests : AbstractOnServerIT() {
|
||||
companion object {
|
||||
private const val MAX_FILENAME_SIZE = 250
|
||||
|
||||
@@ -17,7 +17,7 @@ import junit.framework.TestCase.assertEquals
|
||||
import junit.framework.TestCase.assertTrue
|
||||
import org.junit.Test
|
||||
|
||||
@Suppress("MagicNumber", "TooManyFunctions")
|
||||
@Suppress("MagicNumber")
|
||||
class OCCapabilityJsonToListTests : AbstractIT() {
|
||||
private var capability: OCCapability = fileDataStorageManager.getCapability(account.name)
|
||||
|
||||
|
||||
@@ -18,7 +18,6 @@ import junit.framework.TestCase.assertFalse
|
||||
import junit.framework.TestCase.assertTrue
|
||||
import org.junit.Test
|
||||
|
||||
@Suppress("TooManyFunctions")
|
||||
class SharePermissionManagerTest {
|
||||
|
||||
private fun createShare(sharePermission: Int, isFolder: Boolean = false, attributesJson: String? = null): OCShare =
|
||||
|
||||
@@ -11,7 +11,6 @@ import com.nextcloud.utils.extensions.webDavParentPath
|
||||
import org.junit.Assert.assertEquals
|
||||
import org.junit.Test
|
||||
|
||||
@Suppress("TooManyFunctions")
|
||||
class WebDavParentPathTests {
|
||||
|
||||
@Test
|
||||
|
||||
@@ -40,7 +40,7 @@ import java.nio.file.attribute.BasicFileAttributes
|
||||
import java.util.concurrent.TimeUnit
|
||||
import kotlin.math.abs
|
||||
|
||||
@Suppress("TooManyFunctions", "DEPRECATION")
|
||||
@Suppress("DEPRECATION")
|
||||
class UploadIT : AbstractOnServerIT() {
|
||||
private val uploadsStorageManager = UploadsStorageManager(
|
||||
UserAccountManagerImpl.fromContext(targetContext),
|
||||
|
||||
-4
@@ -18,7 +18,6 @@ class AuthenticatorActivityIT {
|
||||
}
|
||||
|
||||
@Test
|
||||
@Suppress("TooGenericExceptionCaught")
|
||||
fun tryCatch() {
|
||||
val color = try {
|
||||
Color.parseColor("1")
|
||||
@@ -30,7 +29,6 @@ class AuthenticatorActivityIT {
|
||||
}
|
||||
|
||||
@Test
|
||||
@Suppress("TooGenericExceptionCaught")
|
||||
fun tryCatch2() {
|
||||
val color = try {
|
||||
Color.parseColor("")
|
||||
@@ -42,7 +40,6 @@ class AuthenticatorActivityIT {
|
||||
}
|
||||
|
||||
@Test
|
||||
@Suppress("TooGenericExceptionCaught")
|
||||
fun tryCatch3() {
|
||||
val color = try {
|
||||
Color.parseColor(null)
|
||||
@@ -54,7 +51,6 @@ class AuthenticatorActivityIT {
|
||||
}
|
||||
|
||||
@Test
|
||||
@Suppress("TooGenericExceptionCaught")
|
||||
fun tryCatch4() {
|
||||
val color = try {
|
||||
Color.parseColor("abc")
|
||||
|
||||
+2
-2
@@ -12,7 +12,7 @@ import com.owncloud.android.lib.resources.e2ee.DeleteEncryptedFilesRemoteOperati
|
||||
import com.owncloud.android.lib.resources.users.DeletePrivateKeyRemoteOperation
|
||||
import com.owncloud.android.lib.resources.users.DeletePublicKeyRemoteOperation
|
||||
import com.owncloud.android.lib.resources.users.GetPrivateKeyRemoteOperation
|
||||
import com.owncloud.android.lib.resources.users.GetPublicKeyRemoteOperation
|
||||
import com.owncloud.android.lib.resources.users.GetCertificateRemoteOperation
|
||||
import com.owncloud.android.lib.resources.users.StorePrivateKeyRemoteOperation
|
||||
import com.owncloud.android.ui.dialog.setupEncryption.EncryptionKeyGenerator
|
||||
import com.owncloud.android.utils.EncryptionUtils
|
||||
@@ -58,7 +58,7 @@ class DeleteE2ERemoteOperationIT : AbstractOnServerIT() {
|
||||
val result = sut.execute(nextcloudClient)
|
||||
assertTrue(result.isSuccess)
|
||||
|
||||
val getResult = GetPublicKeyRemoteOperation().execute(nextcloudClient)
|
||||
val getResult = GetCertificateRemoteOperation().execute(nextcloudClient)
|
||||
assertFalse(getResult.isSuccess)
|
||||
}
|
||||
}
|
||||
@@ -18,7 +18,7 @@ import org.junit.Assert.assertTrue
|
||||
import org.junit.Test
|
||||
import java.io.File
|
||||
|
||||
@Suppress("TooManyFunctions", "DEPRECATION")
|
||||
@Suppress("DEPRECATION")
|
||||
class InternalTwoWaySyncIT : AbstractInternalTwoWaySyncIT() {
|
||||
|
||||
companion object {
|
||||
|
||||
+2
-2
@@ -4,7 +4,7 @@
|
||||
* SPDX-FileCopyrightText: 2020 Torsten Grote <t@grobox.de>
|
||||
* SPDX-License-Identifier: AGPL-3.0-or-later OR GPL-2.0-only
|
||||
*/
|
||||
package com.owncloud.android.providers
|
||||
package com.owncloud.android.providers.documentstorage
|
||||
|
||||
import android.content.Context
|
||||
import android.database.ContentObserver
|
||||
@@ -25,7 +25,7 @@ import com.owncloud.android.datamodel.OCFile
|
||||
import com.owncloud.android.lib.common.OwnCloudClient
|
||||
import com.owncloud.android.lib.common.utils.Log_OC
|
||||
import com.owncloud.android.lib.resources.files.ExistenceCheckRemoteOperation
|
||||
import com.owncloud.android.providers.DocumentsStorageProvider.DOCUMENTID_SEPARATOR
|
||||
import com.owncloud.android.providers.documentstorage.DocumentsStorageProvider.Companion.DOCUMENTID_SEPARATOR
|
||||
import kotlinx.coroutines.Dispatchers
|
||||
import kotlinx.coroutines.TimeoutCancellationException
|
||||
import kotlinx.coroutines.suspendCancellableCoroutine
|
||||
+11
-11
@@ -4,7 +4,7 @@
|
||||
* SPDX-FileCopyrightText: 2020 Torsten Grote <t@grobox.de>
|
||||
* SPDX-License-Identifier: AGPL-3.0-or-later OR GPL-2.0-only
|
||||
*/
|
||||
package com.owncloud.android.providers
|
||||
package com.owncloud.android.providers.documentstorage
|
||||
|
||||
import android.provider.DocumentsContract
|
||||
import androidx.documentfile.provider.DocumentFile
|
||||
@@ -20,16 +20,16 @@ import com.owncloud.android.datamodel.UploadsStorageManager.UploadStatus
|
||||
import com.owncloud.android.db.OCUpload
|
||||
import com.owncloud.android.db.UploadResult
|
||||
import com.owncloud.android.lib.common.utils.Log_OC
|
||||
import com.owncloud.android.providers.DocumentsProviderUtils.assertExistsOnServer
|
||||
import com.owncloud.android.providers.DocumentsProviderUtils.assertListFilesEquals
|
||||
import com.owncloud.android.providers.DocumentsProviderUtils.assertReadEquals
|
||||
import com.owncloud.android.providers.DocumentsProviderUtils.assertRecentlyModified
|
||||
import com.owncloud.android.providers.DocumentsProviderUtils.assertRegularFile
|
||||
import com.owncloud.android.providers.DocumentsProviderUtils.assertRegularFolder
|
||||
import com.owncloud.android.providers.DocumentsProviderUtils.findFileBlocking
|
||||
import com.owncloud.android.providers.DocumentsProviderUtils.getOCFile
|
||||
import com.owncloud.android.providers.DocumentsProviderUtils.listFilesBlocking
|
||||
import com.owncloud.android.providers.DocumentsStorageProvider.DOCUMENTID_SEPARATOR
|
||||
import com.owncloud.android.providers.documentstorage.DocumentsProviderUtils.assertExistsOnServer
|
||||
import com.owncloud.android.providers.documentstorage.DocumentsProviderUtils.assertListFilesEquals
|
||||
import com.owncloud.android.providers.documentstorage.DocumentsProviderUtils.assertReadEquals
|
||||
import com.owncloud.android.providers.documentstorage.DocumentsProviderUtils.assertRecentlyModified
|
||||
import com.owncloud.android.providers.documentstorage.DocumentsProviderUtils.assertRegularFile
|
||||
import com.owncloud.android.providers.documentstorage.DocumentsProviderUtils.assertRegularFolder
|
||||
import com.owncloud.android.providers.documentstorage.DocumentsProviderUtils.findFileBlocking
|
||||
import com.owncloud.android.providers.documentstorage.DocumentsProviderUtils.getOCFile
|
||||
import com.owncloud.android.providers.documentstorage.DocumentsProviderUtils.listFilesBlocking
|
||||
import com.owncloud.android.providers.documentstorage.DocumentsStorageProvider.Companion.DOCUMENTID_SEPARATOR
|
||||
import kotlinx.coroutines.runBlocking
|
||||
import org.apache.commons.httpclient.HttpStatus
|
||||
import org.apache.commons.httpclient.methods.ByteArrayRequestEntity
|
||||
@@ -52,7 +52,7 @@ class LoginIT : AbstractIT() {
|
||||
*/
|
||||
@Test
|
||||
@Throws(InterruptedException::class)
|
||||
@Suppress("MagicNumber", "SwallowedException")
|
||||
@Suppress("MagicNumber")
|
||||
@SdkSuppress(minSdkVersion = Build.VERSION_CODES.Q)
|
||||
@Flaky("Login no longer uses an in-app WebView, so espresso-web (Espresso.onWebView) cannot drive it. ")
|
||||
fun login() {
|
||||
|
||||
@@ -31,7 +31,6 @@ import javax.inject.Provider
|
||||
import org.junit.Before
|
||||
import org.junit.Test
|
||||
|
||||
@Suppress("TooManyFunctions")
|
||||
class UnifiedSearchListAdapterIT : AbstractIT() {
|
||||
|
||||
private val testClassName = "com.owncloud.android.ui.adapter.UnifiedSearchListAdapterIT"
|
||||
|
||||
@@ -46,7 +46,7 @@ import com.nextcloud.utils.EditorUtils
|
||||
import com.owncloud.android.AbstractIT
|
||||
import com.owncloud.android.MainApp
|
||||
import com.owncloud.android.R
|
||||
import com.owncloud.android.authentication.EnforcedServer
|
||||
import com.owncloud.android.authentication.server.EnforcedServer
|
||||
import com.owncloud.android.datamodel.ArbitraryDataProvider
|
||||
import com.owncloud.android.datamodel.ArbitraryDataProviderImpl
|
||||
import com.owncloud.android.datamodel.FileDataStorageManager
|
||||
@@ -78,7 +78,6 @@ import org.junit.Test
|
||||
import java.net.URI
|
||||
import java.util.function.Supplier
|
||||
|
||||
@Suppress("TooManyFunctions")
|
||||
class DialogFragmentIT : AbstractIT() {
|
||||
private val testClassName = "com.owncloud.android.ui.dialog.DialogFragmentIT"
|
||||
private val serverUrl = "https://nextcloud.localhost"
|
||||
|
||||
-1
@@ -58,7 +58,6 @@ import org.junit.Before
|
||||
import org.junit.Rule
|
||||
import org.junit.Test
|
||||
|
||||
@Suppress("TooManyFunctions")
|
||||
class FileDetailSharingFragmentIT : AbstractIT() {
|
||||
private val testClassName = "com.owncloud.android.ui.fragment.FileDetailSharingFragmentIT"
|
||||
|
||||
|
||||
@@ -151,7 +151,6 @@ class GalleryFragmentIT : AbstractIT() {
|
||||
}
|
||||
|
||||
/** Recursively walk view tree to find the first RecyclerView. Runs on the same thread that calls it. */
|
||||
@Suppress("ReturnCount")
|
||||
private fun findRecyclerViewRecursively(root: View?): RecyclerView? {
|
||||
if (root == null) return null
|
||||
if (root is RecyclerView) return root
|
||||
|
||||
@@ -115,7 +115,6 @@ class NotificationsFragmentIT : AbstractIT() {
|
||||
add(buildNotificationManyActions())
|
||||
}
|
||||
|
||||
@Suppress("ReturnCount")
|
||||
private fun findFragment(sut: NavigatorActivity): NotificationsFragment? {
|
||||
val allFragments = sut.supportFragmentManager.fragments
|
||||
for (f in allFragments) {
|
||||
|
||||
+10
-9
@@ -246,7 +246,7 @@ class OCFileListFragmentStaticServerIT : AbstractIT() {
|
||||
sut.supportFragmentManager.executePendingTransactions()
|
||||
val root = sut.storageManager.getFileByEncryptedRemotePath("/")
|
||||
fragment.listDirectory(root, false)
|
||||
fragment.adapter.setShowShareAvatar(true)
|
||||
requireNotNull(fragment.adapter).setShowShareAvatar(true)
|
||||
}
|
||||
|
||||
val screenShotName = createName(testClassName + "_" + "showSharedFiles", "")
|
||||
@@ -334,7 +334,7 @@ class OCFileListFragmentStaticServerIT : AbstractIT() {
|
||||
sut.supportFragmentManager.executePendingTransactions()
|
||||
val root = sut.storageManager.getFileByEncryptedRemotePath("/")
|
||||
fragment.listDirectory(root, false)
|
||||
fragment.adapter.setShowShareAvatar(true)
|
||||
requireNotNull(fragment.adapter).setShowShareAvatar(true)
|
||||
}
|
||||
|
||||
val screenShotName = createName(testClassName + "_" + "showFolderTypes", "")
|
||||
@@ -399,27 +399,28 @@ class OCFileListFragmentStaticServerIT : AbstractIT() {
|
||||
}
|
||||
|
||||
val testFolder: OCFile = activity!!.storageManager.getFileByEncryptedRemotePath("/test/")
|
||||
val adapter = requireNotNull(sut.adapter)
|
||||
|
||||
// richWorkspace is not set
|
||||
Assert.assertFalse(sut.adapter.shouldShowHeader())
|
||||
Assert.assertFalse(adapter.shouldShowHeader())
|
||||
|
||||
testFolder.richWorkspace = " "
|
||||
activity.storageManager.saveFile(testFolder)
|
||||
sut.adapter.swapDirectory(user, testFolder, activity.storageManager, false, "")
|
||||
adapter.swapDirectory(user, testFolder, activity.storageManager, false, "")
|
||||
|
||||
Assert.assertFalse(sut.adapter.shouldShowHeader())
|
||||
Assert.assertFalse(adapter.shouldShowHeader())
|
||||
|
||||
testFolder.richWorkspace = null
|
||||
activity.storageManager.saveFile(testFolder)
|
||||
sut.adapter.swapDirectory(user, testFolder, activity.storageManager, false, "")
|
||||
Assert.assertFalse(sut.adapter.shouldShowHeader())
|
||||
adapter.swapDirectory(user, testFolder, activity.storageManager, false, "")
|
||||
Assert.assertFalse(adapter.shouldShowHeader())
|
||||
|
||||
EspressoIdlingResource.increment()
|
||||
testFolder.richWorkspace = "1"
|
||||
activity.storageManager.saveFile(testFolder)
|
||||
sut.adapter.setCurrentDirectory(testFolder)
|
||||
adapter.setCurrentDirectory(testFolder)
|
||||
|
||||
Assert.assertTrue(sut.adapter.shouldShowHeader())
|
||||
Assert.assertTrue(adapter.shouldShowHeader())
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -170,7 +170,7 @@ internal class SharedListFragmentIT : AbstractIT() {
|
||||
OCShareToOCFileConverter
|
||||
.parseAndSaveShares(listOf(), shares, storageManager, user)
|
||||
}
|
||||
fragment.adapter.run {
|
||||
requireNotNull(fragment.adapter).run {
|
||||
prepareForSearchData(SearchType.SHARED_FILTER)
|
||||
updateAdapter(newList, null)
|
||||
}
|
||||
|
||||
@@ -32,7 +32,6 @@ class TrashbinFragmentIT : AbstractIT() {
|
||||
FILES
|
||||
}
|
||||
|
||||
@Suppress("ReturnCount")
|
||||
private fun findFragment(sut: NavigatorActivity): TrashbinFragment? {
|
||||
val allFragments = sut.supportFragmentManager.fragments
|
||||
for (f in allFragments) {
|
||||
|
||||
@@ -1,55 +0,0 @@
|
||||
/*
|
||||
* Nextcloud - Android Client
|
||||
*
|
||||
* SPDX-FileCopyrightText: 2021-2022 Chris Narkiewicz <hello@ezaquarii.com>
|
||||
* SPDX-FileCopyrightText: 2019-2021 Tobias Kaminsky <tobias@kaminsky.me>
|
||||
* SPDX-License-Identifier: AGPL-3.0-or-later OR GPL-2.0-only
|
||||
*/
|
||||
package com.owncloud.android.util;
|
||||
|
||||
import android.content.Context;
|
||||
import android.content.res.Resources;
|
||||
|
||||
import com.nextcloud.client.account.MockUser;
|
||||
import com.nextcloud.client.account.User;
|
||||
import com.owncloud.android.MainApp;
|
||||
import com.owncloud.android.datamodel.FileDataStorageManager;
|
||||
import com.owncloud.android.datamodel.OCFile;
|
||||
import com.owncloud.android.lib.common.operations.RemoteOperationResult;
|
||||
import com.owncloud.android.operations.RemoveFileOperation;
|
||||
import com.owncloud.android.utils.ErrorMessageAdapter;
|
||||
|
||||
import org.junit.Test;
|
||||
import org.junit.runner.RunWith;
|
||||
|
||||
import androidx.test.ext.junit.runners.AndroidJUnit4;
|
||||
import androidx.test.platform.app.InstrumentationRegistry;
|
||||
|
||||
import static junit.framework.TestCase.assertEquals;
|
||||
|
||||
@RunWith(AndroidJUnit4.class)
|
||||
public class ErrorMessageAdapterIT {
|
||||
private final static String PATH_TO_DELETE = "/path/to/a.file";
|
||||
private final static String EXPECTED_ERROR_MESSAGE = "You are not permitted to delete this file";
|
||||
private final static String ACCOUNT_TYPE = "nextcloud";
|
||||
|
||||
@Test
|
||||
public void getErrorCauseMessageForForbiddenRemoval() {
|
||||
Resources resources = InstrumentationRegistry.getInstrumentation().getTargetContext().getResources();
|
||||
User user = new MockUser("name", ACCOUNT_TYPE);
|
||||
Context context = MainApp.getAppContext();
|
||||
|
||||
String errorMessage = ErrorMessageAdapter.getErrorCauseMessage(
|
||||
new RemoteOperationResult(RemoteOperationResult.ResultCode.FORBIDDEN),
|
||||
new RemoveFileOperation(new OCFile(PATH_TO_DELETE),
|
||||
false,
|
||||
user,
|
||||
false,
|
||||
context,
|
||||
new FileDataStorageManager(user, context.getContentResolver())),
|
||||
resources
|
||||
);
|
||||
|
||||
assertEquals(EXPECTED_ERROR_MESSAGE, errorMessage);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,54 @@
|
||||
/*
|
||||
* Nextcloud - Android Client
|
||||
*
|
||||
* SPDX-FileCopyrightText: 2026 Alper Ozturk <alper.ozturk@nextcloud.com>
|
||||
* SPDX-FileCopyrightText: 2021-2022 Chris Narkiewicz <hello@ezaquarii.com>
|
||||
* SPDX-FileCopyrightText: 2019-2021 Tobias Kaminsky <tobias@kaminsky.me>
|
||||
* SPDX-License-Identifier: AGPL-3.0-or-later OR GPL-2.0-only
|
||||
*/
|
||||
package com.owncloud.android.util
|
||||
|
||||
import androidx.test.ext.junit.runners.AndroidJUnit4
|
||||
import androidx.test.platform.app.InstrumentationRegistry
|
||||
import com.nextcloud.client.account.MockUser
|
||||
import com.nextcloud.client.account.User
|
||||
import com.owncloud.android.MainApp
|
||||
import com.owncloud.android.datamodel.FileDataStorageManager
|
||||
import com.owncloud.android.datamodel.OCFile
|
||||
import com.owncloud.android.lib.common.operations.RemoteOperationResult
|
||||
import com.owncloud.android.operations.RemoveFileOperation
|
||||
import com.owncloud.android.utils.ErrorMessageAdapter.getErrorCauseMessage
|
||||
import junit.framework.TestCase
|
||||
import org.junit.Test
|
||||
import org.junit.runner.RunWith
|
||||
|
||||
@RunWith(AndroidJUnit4::class)
|
||||
class ErrorMessageAdapterIT {
|
||||
@Test
|
||||
fun getErrorCauseMessageForForbiddenRemoval() {
|
||||
val resources = InstrumentationRegistry.getInstrumentation().targetContext.resources
|
||||
val user: User = MockUser("name", ACCOUNT_TYPE)
|
||||
val context = MainApp.getAppContext()
|
||||
|
||||
val errorMessage = getErrorCauseMessage(
|
||||
RemoteOperationResult<Any?>(RemoteOperationResult.ResultCode.FORBIDDEN),
|
||||
RemoveFileOperation(
|
||||
OCFile(PATH_TO_DELETE),
|
||||
false,
|
||||
user,
|
||||
false,
|
||||
context,
|
||||
FileDataStorageManager(user, context.contentResolver)
|
||||
),
|
||||
resources
|
||||
)
|
||||
|
||||
TestCase.assertEquals(EXPECTED_ERROR_MESSAGE, errorMessage)
|
||||
}
|
||||
|
||||
companion object {
|
||||
private const val PATH_TO_DELETE = "/path/to/a.file"
|
||||
private const val EXPECTED_ERROR_MESSAGE = "You are not permitted to delete this file"
|
||||
private const val ACCOUNT_TYPE = "nextcloud"
|
||||
}
|
||||
}
|
||||
@@ -32,7 +32,7 @@ import org.junit.Assert.assertFalse
|
||||
import org.junit.Assert.assertNotEquals
|
||||
import org.junit.Test
|
||||
|
||||
@Suppress("TooManyFunctions", "LargeClass")
|
||||
@Suppress("LargeClass")
|
||||
class EncryptionUtilsV2IT : EncryptionIT() {
|
||||
private val encryptionTestUtils = EncryptionTestUtils()
|
||||
private val encryptionUtilsV2 = EncryptionUtilsV2()
|
||||
|
||||
@@ -30,7 +30,6 @@ import org.junit.Assert.assertNull
|
||||
import org.junit.Before
|
||||
import org.junit.Test
|
||||
|
||||
@Suppress("TooManyFunctions")
|
||||
class FileUploadHelperTest {
|
||||
|
||||
private lateinit var uploadDao: UploadDao
|
||||
@@ -49,7 +48,6 @@ class FileUploadHelperTest {
|
||||
fileUploadHelper.fileStorageManager = mockFileStorageManager
|
||||
}
|
||||
|
||||
@Suppress("LongParameterList")
|
||||
private fun buildEntity(
|
||||
id: Int = 1,
|
||||
localPath: String = this.localPath,
|
||||
|
||||
@@ -481,7 +481,7 @@
|
||||
android:exported="false"
|
||||
android:label="@string/share_search" />
|
||||
<provider
|
||||
android:name=".providers.DocumentsStorageProvider"
|
||||
android:name=".providers.documentstorage.DocumentsStorageProvider"
|
||||
android:authorities="@string/document_provider_authority"
|
||||
android:enabled="true"
|
||||
android:exported="true"
|
||||
|
||||
@@ -43,6 +43,7 @@ import org.apache.commons.httpclient.methods.RequestEntity;
|
||||
import org.apache.commons.httpclient.methods.StringRequestEntity;
|
||||
import org.apache.jackrabbit.webdav.DavConstants;
|
||||
import org.apache.jackrabbit.webdav.client.methods.MkColMethod;
|
||||
import org.apache.jackrabbit.webdav.client.methods.MoveMethod;
|
||||
import org.apache.jackrabbit.webdav.client.methods.PropFindMethod;
|
||||
import org.apache.jackrabbit.webdav.property.DavPropertyNameSet;
|
||||
|
||||
@@ -280,6 +281,15 @@ public class InputStreamBinder extends IInputStreamService.Stub {
|
||||
method = new DeleteMethod(requestUrl);
|
||||
break;
|
||||
|
||||
case "MOVE":
|
||||
String destUrl = request.getAdditionalParameter(NextcloudRequest.ADDITIONAL_PARAMETER_MOVE_DESTINATION);
|
||||
boolean overwrite =
|
||||
"true".equalsIgnoreCase(
|
||||
request.getAdditionalParameter(NextcloudRequest.ADDITIONAL_PARAMETER_MOVE_OVERWRITE)
|
||||
);
|
||||
method = new MoveMethod(requestUrl, destUrl, overwrite);
|
||||
break;
|
||||
|
||||
case "PROPFIND":
|
||||
method = new NCPropFindMethod(requestUrl, DavConstants.PROPFIND_ALL_PROP, DavConstants.DEPTH_1);
|
||||
if (request.getRequestBody() != null) {
|
||||
|
||||
@@ -21,9 +21,13 @@ public class NextcloudRequest implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 215521212534240L; //assign a long value
|
||||
|
||||
public static final String ADDITIONAL_PARAMETER_MOVE_DESTINATION = "Destination";
|
||||
public static final String ADDITIONAL_PARAMETER_MOVE_OVERWRITE = "Overwrite";
|
||||
|
||||
private String method;
|
||||
private Map<String, List<String>> header = new HashMap<>();
|
||||
private Map<String, String> parameter = new HashMap<>();
|
||||
private Map<String, String> additionalParameter = new HashMap<>();
|
||||
private final Collection<QueryParam> parameterV2 = new LinkedList<>();
|
||||
private String requestBody;
|
||||
private String url;
|
||||
@@ -60,6 +64,15 @@ public class NextcloudRequest implements Serializable {
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder setAdditionalParameters(Map<String, String> ap) {
|
||||
ncr.additionalParameter = ap;
|
||||
return this;
|
||||
}
|
||||
public Builder setAdditionalParameter(String key, String value) {
|
||||
ncr.additionalParameter.put(key, value);
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder setRequestBody(String requestBody) {
|
||||
ncr.requestBody = requestBody;
|
||||
return this;
|
||||
@@ -103,6 +116,13 @@ public class NextcloudRequest implements Serializable {
|
||||
return this.parameter;
|
||||
}
|
||||
|
||||
public Map<String, String> getAdditionalParameters() {
|
||||
return this.additionalParameter;
|
||||
}
|
||||
public String getAdditionalParameter(String key) {
|
||||
return this.additionalParameter.get(key);
|
||||
}
|
||||
|
||||
public String getRequestBody() {
|
||||
return this.requestBody;
|
||||
}
|
||||
|
||||
@@ -88,7 +88,7 @@ import kotlinx.coroutines.withContext
|
||||
private const val CHAT_INPUT_DELAY = 100L
|
||||
private const val PULL_TO_REFRESH_DELAY = 1500L
|
||||
|
||||
@Suppress("LongMethod")
|
||||
@Suppress("LongMethod", "CyclomaticComplexMethod")
|
||||
@OptIn(ExperimentalMaterial3Api::class)
|
||||
@Composable
|
||||
fun AssistantScreen(
|
||||
|
||||
@@ -28,7 +28,6 @@ import kotlinx.coroutines.flow.update
|
||||
import kotlinx.coroutines.isActive
|
||||
import kotlinx.coroutines.launch
|
||||
|
||||
@Suppress("TooManyFunctions")
|
||||
class AssistantViewModel(
|
||||
private val accountName: String,
|
||||
private val remoteRepository: AssistantRemoteRepository,
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
* SPDX-License-Identifier: AGPL-3.0-or-later
|
||||
*/
|
||||
|
||||
@file:Suppress("TopLevelPropertyNaming", "MagicNumber")
|
||||
@file:Suppress("MagicNumber")
|
||||
|
||||
package com.nextcloud.client.assistant.chat
|
||||
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
* SPDX-License-Identifier: AGPL-3.0-or-later
|
||||
*/
|
||||
|
||||
@file:Suppress("TopLevelPropertyNaming", "MagicNumber")
|
||||
@file:Suppress("MagicNumber")
|
||||
|
||||
package com.nextcloud.client.assistant.conversation
|
||||
|
||||
|
||||
@@ -146,7 +146,7 @@ fun TranslationScreen(viewModel: TranslationViewModel, assistantViewModel: Assis
|
||||
}
|
||||
}
|
||||
|
||||
@Suppress("LongMethod", "LongParameterList")
|
||||
@Suppress("LongMethod")
|
||||
@Composable
|
||||
private fun TranslationSection(
|
||||
labelId: Int,
|
||||
|
||||
@@ -11,7 +11,6 @@ import com.owncloud.android.R
|
||||
import com.owncloud.android.lib.resources.assistant.v2.model.TaskTypeData
|
||||
import com.owncloud.android.lib.resources.assistant.v2.model.toTranslationLanguages
|
||||
|
||||
@Suppress("LongParameterList")
|
||||
sealed class TranslationScreenState(
|
||||
open val taskTypeData: TaskTypeData,
|
||||
open val source: TranslationSideState,
|
||||
|
||||
@@ -84,7 +84,6 @@ class TranslationViewModel(private val remoteRepository: AssistantRemoteReposito
|
||||
}
|
||||
}
|
||||
|
||||
@Suppress("ReturnCount")
|
||||
private suspend fun pollTranslationResult() {
|
||||
val screenStateValue = _screenState.value
|
||||
if (screenStateValue is Uninitialized) {
|
||||
|
||||
@@ -12,7 +12,6 @@ import java.util.concurrent.atomic.AtomicBoolean
|
||||
* This is a wrapper for a task function running in background.
|
||||
* It executes task function and handles result or error delivery.
|
||||
*/
|
||||
@Suppress("LongParameterList")
|
||||
internal class Task<T, P>(
|
||||
private val postResult: (Runnable) -> Boolean,
|
||||
private val removeFromQueue: (Runnable) -> Boolean,
|
||||
@@ -32,7 +31,6 @@ internal class Task<T, P>(
|
||||
postResult(Runnable { onProgress?.invoke(p) })
|
||||
}
|
||||
|
||||
@Suppress("TooGenericExceptionCaught") // this is exactly what we want here
|
||||
override fun run() {
|
||||
try {
|
||||
val result = taskBody.invoke({ postProgress(it) }, this::isCancelled)
|
||||
|
||||
@@ -109,7 +109,6 @@ import com.owncloud.android.db.ProviderMeta
|
||||
],
|
||||
exportSchema = true
|
||||
)
|
||||
@Suppress("Detekt.UnnecessaryAbstractClass") // needed by Room
|
||||
@TypeConverters(OfflineOperationTypeConverter::class)
|
||||
abstract class NextcloudDatabase : RoomDatabase() {
|
||||
|
||||
|
||||
@@ -14,7 +14,6 @@ import com.nextcloud.client.database.entity.FileEntity
|
||||
import com.owncloud.android.db.ProviderMeta.ProviderTableMeta
|
||||
import com.owncloud.android.utils.MimeType
|
||||
|
||||
@Suppress("TooManyFunctions")
|
||||
@Dao
|
||||
interface FileDao {
|
||||
@Update
|
||||
|
||||
@@ -162,7 +162,7 @@ data class CapabilityEntity(
|
||||
val sharingJson: String?
|
||||
)
|
||||
|
||||
@Suppress("LongMethod", "ReturnCount")
|
||||
@Suppress("LongMethod", "CyclomaticComplexMethod")
|
||||
fun CapabilityEntity?.toOCCapability(): OCCapability {
|
||||
val capability = OCCapability()
|
||||
if (this == null) return capability
|
||||
|
||||
@@ -71,6 +71,7 @@ data class UploadEntity(
|
||||
val folderUnlockToken: String?
|
||||
)
|
||||
|
||||
@Suppress("CyclomaticComplexMethod")
|
||||
fun UploadEntity.toOCUpload(capability: OCCapability? = null): OCUpload? {
|
||||
val localPath = localPath
|
||||
var remotePath = remotePath
|
||||
|
||||
@@ -28,6 +28,7 @@ import com.nextcloud.client.core.ThreadPoolAsyncRunner
|
||||
import com.nextcloud.client.database.dao.ArbitraryDataDao
|
||||
import com.nextcloud.client.device.DeviceInfo
|
||||
import com.nextcloud.client.jobs.operation.FileOperationHelper
|
||||
import com.nextcloud.client.jobs.upload.FileUploadHelper
|
||||
import com.nextcloud.client.logger.FileLogHandler
|
||||
import com.nextcloud.client.logger.Logger
|
||||
import com.nextcloud.client.logger.LoggerImpl
|
||||
@@ -73,7 +74,6 @@ import javax.inject.Singleton
|
||||
import com.nextcloud.utils.AppConstants.BYTES_PER_MB
|
||||
|
||||
@Module(includes = [ComponentsModule::class, VariantComponentsModule::class, BuildTypeComponentsModule::class])
|
||||
@Suppress("TooManyFunctions")
|
||||
internal class AppModule {
|
||||
|
||||
@Provides
|
||||
@@ -120,6 +120,9 @@ internal class AppModule {
|
||||
@Provides
|
||||
fun clientRepository(repository: RemoteClientRepository): ClientRepository = repository
|
||||
|
||||
@Provides
|
||||
fun fileUploadHelper(): FileUploadHelper = FileUploadHelper.instance()
|
||||
|
||||
@Provides
|
||||
fun uploadsStorageManager(currentAccountProvider: CurrentAccountProvider, context: Context): UploadsStorageManager =
|
||||
UploadsStorageManager(currentAccountProvider, context.contentResolver)
|
||||
|
||||
@@ -43,7 +43,7 @@ import com.owncloud.android.authentication.AuthenticatorActivity
|
||||
import com.owncloud.android.authentication.DeepLinkLoginActivity
|
||||
import com.owncloud.android.files.BootupBroadcastReceiver
|
||||
import com.owncloud.android.providers.DiskLruImageCacheFileProvider
|
||||
import com.owncloud.android.providers.DocumentsStorageProvider
|
||||
import com.owncloud.android.providers.documentstorage.DocumentsStorageProvider
|
||||
import com.owncloud.android.providers.FileContentProvider
|
||||
import com.owncloud.android.providers.UsersAndGroupsSearchProvider
|
||||
import com.owncloud.android.services.AccountManagerService
|
||||
@@ -144,7 +144,6 @@ import dagger.android.ContributesAndroidInjector
|
||||
* Register classes that require dependency injection. This class is used by Dagger compiler only.
|
||||
*/
|
||||
@Module
|
||||
@Suppress("TooManyFunctions")
|
||||
internal interface ComponentsModule {
|
||||
@ContributesAndroidInjector
|
||||
fun trashbinFragment(): TrashbinFragment
|
||||
|
||||
@@ -10,7 +10,6 @@ package com.nextcloud.client.di
|
||||
import com.nextcloud.android.common.ui.theme.MaterialSchemes
|
||||
import com.owncloud.android.utils.theme.MaterialSchemesProvider
|
||||
import com.owncloud.android.utils.theme.MaterialSchemesProviderImpl
|
||||
import com.owncloud.android.utils.theme.ThemeColorUtils
|
||||
import com.owncloud.android.utils.theme.ThemeUtils
|
||||
import dagger.Binds
|
||||
import dagger.Module
|
||||
@@ -25,10 +24,6 @@ internal abstract class ThemeModule {
|
||||
|
||||
companion object {
|
||||
|
||||
@Provides
|
||||
@Singleton
|
||||
fun themeColorUtils(): ThemeColorUtils = ThemeColorUtils()
|
||||
|
||||
@Provides
|
||||
@Singleton
|
||||
fun themeUtils(): ThemeUtils = ThemeUtils()
|
||||
|
||||
@@ -24,7 +24,7 @@ import com.owncloud.android.R
|
||||
import com.owncloud.android.databinding.ActivityDocumentScanBinding
|
||||
import com.owncloud.android.databinding.DialogScanExportTypeBinding
|
||||
import com.owncloud.android.ui.activity.ToolbarActivity
|
||||
import com.owncloud.android.utils.theme.ViewThemeUtils
|
||||
import com.owncloud.android.ui.navigation.model.ActionBarStyle
|
||||
import javax.inject.Inject
|
||||
|
||||
class DocumentScanActivity :
|
||||
@@ -37,9 +37,6 @@ class DocumentScanActivity :
|
||||
@Inject
|
||||
lateinit var logger: Logger
|
||||
|
||||
@Inject
|
||||
lateinit var viewThemeUtils: ViewThemeUtils
|
||||
|
||||
@Inject
|
||||
lateinit var appScanOptionalFeature: AppScanOptionalFeature
|
||||
|
||||
@@ -71,7 +68,7 @@ class DocumentScanActivity :
|
||||
binding = ActivityDocumentScanBinding.inflate(layoutInflater)
|
||||
setContentView(binding.root)
|
||||
|
||||
setupToolbar()
|
||||
showActionBar(ActionBarStyle.Plain)
|
||||
supportActionBar?.let {
|
||||
it.setDisplayHomeAsUpEnabled(true)
|
||||
it.setDisplayShowHomeEnabled(true)
|
||||
|
||||
@@ -29,7 +29,6 @@ import kotlinx.coroutines.launch
|
||||
import java.io.File
|
||||
import javax.inject.Inject
|
||||
|
||||
@Suppress("Detekt.LongParameterList") // satisfied by DI
|
||||
class DocumentScanViewModel @Inject constructor(
|
||||
@IoDispatcher private val ioDispatcher: CoroutineDispatcher = Dispatchers.IO,
|
||||
app: Application,
|
||||
|
||||
@@ -30,7 +30,6 @@ import com.owncloud.android.utils.theme.ViewThemeUtils
|
||||
import java.io.File
|
||||
import java.security.SecureRandom
|
||||
|
||||
@Suppress("Detekt.LongParameterList") // constructed only from factory method and tests
|
||||
class GeneratePdfFromImagesWork(
|
||||
private val appContext: Context,
|
||||
private val generatePdfUseCase: GeneratePDFUseCase,
|
||||
|
||||
@@ -27,7 +27,6 @@ class ExceptionHandler(
|
||||
}
|
||||
|
||||
override fun uncaughtException(thread: Thread, exception: Throwable) {
|
||||
@Suppress("TooGenericExceptionCaught") // this is exactly what we want here
|
||||
try {
|
||||
val errorReport = generateErrorReport(formatException(thread, exception))
|
||||
val intent = Intent(context, ShowErrorActivity::class.java)
|
||||
|
||||
@@ -17,6 +17,7 @@ import com.nextcloud.client.di.Injectable
|
||||
import com.nextcloud.client.di.ViewModelFactory
|
||||
import com.owncloud.android.R
|
||||
import com.owncloud.android.ui.activity.ToolbarActivity
|
||||
import com.owncloud.android.ui.navigation.model.ActionBarStyle
|
||||
import javax.inject.Inject
|
||||
|
||||
class EtmActivity :
|
||||
@@ -38,8 +39,8 @@ class EtmActivity :
|
||||
override fun onCreate(savedInstanceState: Bundle?) {
|
||||
super.onCreate(savedInstanceState)
|
||||
setContentView(R.layout.activity_etm)
|
||||
setupToolbar()
|
||||
updateActionBarTitleAndHomeButtonByString(getString(R.string.etm_title))
|
||||
showActionBar(ActionBarStyle.Plain)
|
||||
setActionBarTitle(getString(R.string.etm_title))
|
||||
vm = ViewModelProvider(this, viewModelFactory).get(EtmViewModel::class.java)
|
||||
vm.currentPage.observe(
|
||||
this,
|
||||
@@ -80,12 +81,12 @@ class EtmActivity :
|
||||
supportFragmentManager.beginTransaction()
|
||||
.replace(R.id.etm_page_container, fragment)
|
||||
.commit()
|
||||
updateActionBarTitleAndHomeButtonByString("ETM - ${getString(page.titleRes)}")
|
||||
setActionBarTitle("ETM - ${getString(page.titleRes)}")
|
||||
} else {
|
||||
supportFragmentManager.beginTransaction()
|
||||
.replace(R.id.etm_page_container, EtmMenuFragment())
|
||||
.commitNow()
|
||||
updateActionBarTitleAndHomeButtonByString(getString(R.string.etm_title))
|
||||
setActionBarTitle(getString(R.string.etm_title))
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -32,7 +32,6 @@ import com.owncloud.android.R
|
||||
import com.owncloud.android.lib.common.accounts.AccountUtils
|
||||
import javax.inject.Inject
|
||||
|
||||
@Suppress("LongParameterList") // Dependencies Injection
|
||||
@SuppressLint("StaticFieldLeak")
|
||||
class EtmViewModel @Inject constructor(
|
||||
private val context: Context,
|
||||
|
||||
@@ -78,7 +78,6 @@ class DownloadRequest internal constructor(
|
||||
}
|
||||
}
|
||||
|
||||
@Suppress("LongParameterList")
|
||||
class UploadRequest internal constructor(
|
||||
user: User,
|
||||
file: OCFile,
|
||||
|
||||
@@ -36,7 +36,7 @@ import com.owncloud.android.lib.common.OwnCloudClientManagerFactory
|
||||
import com.owncloud.android.lib.common.utils.Log_OC
|
||||
import com.owncloud.android.lib.resources.users.DeleteAppPasswordRemoteOperation
|
||||
import com.owncloud.android.lib.resources.users.RemoteWipeSuccessRemoteOperation
|
||||
import com.owncloud.android.providers.DocumentsStorageProvider
|
||||
import com.owncloud.android.providers.documentstorage.DocumentsStorageProvider
|
||||
import com.owncloud.android.ui.activity.ContactsPreferenceActivity
|
||||
import com.owncloud.android.ui.activity.ManageAccountsActivity
|
||||
import com.owncloud.android.ui.events.AccountRemovedEvent
|
||||
@@ -48,7 +48,6 @@ import java.util.Optional
|
||||
/**
|
||||
* Removes account and all local files
|
||||
*/
|
||||
@Suppress("LongParameterList") // legacy code
|
||||
class AccountRemovalWork(
|
||||
private val context: Context,
|
||||
params: WorkerParameters,
|
||||
@@ -67,7 +66,6 @@ class AccountRemovalWork(
|
||||
const val REMOTE_WIPE = "remote_wipe"
|
||||
}
|
||||
|
||||
@Suppress("ReturnCount") // legacy code
|
||||
override fun doWork(): Result {
|
||||
val accountName = inputData.getString(ACCOUNT) ?: ""
|
||||
if (TextUtils.isEmpty(accountName)) {
|
||||
@@ -185,29 +183,23 @@ class AccountRemovalWork(
|
||||
}
|
||||
}
|
||||
|
||||
private fun createClient(user: User): Optional<OwnCloudClient> {
|
||||
@Suppress("TooGenericExceptionCaught") // needs migration to newer api to get rid of exceptions
|
||||
return try {
|
||||
val context = MainApp.getAppContext()
|
||||
val factory = OwnCloudClientManagerFactory.getDefaultSingleton()
|
||||
val client = factory.getClientFor(user.toOwnCloudAccount(), context)
|
||||
Optional.of(client)
|
||||
} catch (e: Exception) {
|
||||
Log_OC.e(this, "Could not create client", e)
|
||||
Optional.empty()
|
||||
}
|
||||
private fun createClient(user: User): Optional<OwnCloudClient> = try {
|
||||
val context = MainApp.getAppContext()
|
||||
val factory = OwnCloudClientManagerFactory.getDefaultSingleton()
|
||||
val client = factory.getClientFor(user.toOwnCloudAccount(), context)
|
||||
Optional.of(client)
|
||||
} catch (e: Exception) {
|
||||
Log_OC.e(this, "Could not create client", e)
|
||||
Optional.empty()
|
||||
}
|
||||
|
||||
private fun createNextcloudClient(user: User): Optional<NextcloudClient> {
|
||||
@Suppress("TooGenericExceptionCaught") // needs migration to newer api to get rid of exceptions
|
||||
return try {
|
||||
val context = MainApp.getAppContext()
|
||||
val factory = OwnCloudClientManagerFactory.getDefaultSingleton()
|
||||
val client = factory.getNextcloudClientFor(user.toOwnCloudAccount(), context)
|
||||
Optional.of(client)
|
||||
} catch (e: Exception) {
|
||||
Log_OC.e(this, "Could not create client", e)
|
||||
Optional.empty()
|
||||
}
|
||||
private fun createNextcloudClient(user: User): Optional<NextcloudClient> = try {
|
||||
val context = MainApp.getAppContext()
|
||||
val factory = OwnCloudClientManagerFactory.getDefaultSingleton()
|
||||
val client = factory.getNextcloudClientFor(user.toOwnCloudAccount(), context)
|
||||
Optional.of(client)
|
||||
} catch (e: Exception) {
|
||||
Log_OC.e(this, "Could not create client", e)
|
||||
Optional.empty()
|
||||
}
|
||||
}
|
||||
@@ -51,7 +51,6 @@ import javax.inject.Provider
|
||||
*
|
||||
* This class is doing too many things and should be split up into smaller factories.
|
||||
*/
|
||||
@Suppress("LongParameterList", "TooManyFunctions") // satisfied by DI
|
||||
class BackgroundJobFactory @Inject constructor(
|
||||
private val logger: Logger,
|
||||
private val preferences: AppPreferences,
|
||||
@@ -76,7 +75,7 @@ class BackgroundJobFactory @Inject constructor(
|
||||
) : WorkerFactory() {
|
||||
|
||||
@SuppressLint("NewApi")
|
||||
@Suppress("ComplexMethod") // it's just a trivial dispatch
|
||||
@Suppress("CyclomaticComplexMethod") // it's just a trivial dispatch
|
||||
override fun createWorker(
|
||||
context: Context,
|
||||
workerClassName: String,
|
||||
@@ -338,7 +337,6 @@ class BackgroundJobFactory @Inject constructor(
|
||||
accountManager,
|
||||
context,
|
||||
viewThemeUtils.get(),
|
||||
localBroadcastManager.get(),
|
||||
params
|
||||
)
|
||||
|
||||
|
||||
@@ -18,7 +18,6 @@ import com.owncloud.android.operations.DownloadType
|
||||
* This interface allows to control, schedule and monitor all application
|
||||
* long-running background tasks, such as periodic checks or synchronization.
|
||||
*/
|
||||
@Suppress("TooManyFunctions") // we expect this implementation to have rich API
|
||||
interface BackgroundJobManager {
|
||||
|
||||
/**
|
||||
@@ -152,7 +151,6 @@ interface BackgroundJobManager {
|
||||
fun cancelEnqueuedAutoUploads()
|
||||
fun cancelFilesDownloadJob(accountName: String, fileId: Long)
|
||||
|
||||
@Suppress("LongParameterList")
|
||||
fun startFileDownloadJob(
|
||||
user: User,
|
||||
file: OCFile,
|
||||
|
||||
@@ -70,7 +70,6 @@ import kotlin.time.Duration.Companion.days
|
||||
* considered private implementation detail and should not be leaked through the interface, to minimize
|
||||
* potential migration cost in the future.
|
||||
*/
|
||||
@Suppress("TooManyFunctions") // we expect this implementation to have rich API
|
||||
internal class BackgroundJobManagerImpl(
|
||||
private val workManager: WorkManager,
|
||||
private val clock: Clock,
|
||||
@@ -926,6 +925,8 @@ internal class BackgroundJobManagerImpl(
|
||||
|
||||
val request = oneTimeRequestBuilder(FolderDownloadWorker::class, JOB_DOWNLOAD_FOLDER)
|
||||
.addTag(JOB_DOWNLOAD_FOLDER)
|
||||
.addTag(FolderDownloadWorker.formatTag(folder.fileId))
|
||||
.addTag(FolderDownloadWorker.formatParentTag(folder.parentId))
|
||||
.setInputData(data)
|
||||
.setConstraints(constraints)
|
||||
.setExpedited(OutOfQuotaPolicy.RUN_AS_NON_EXPEDITED_WORK_REQUEST)
|
||||
|
||||
@@ -32,7 +32,6 @@ class CalendarImportWork(
|
||||
const val TAG = "CalendarImportWork"
|
||||
}
|
||||
|
||||
@Suppress("TooGenericExceptionCaught")
|
||||
override fun doWork(): Result {
|
||||
val calendars = inputData.keyValueMap as? Map<*, *>
|
||||
if (calendars == null) {
|
||||
|
||||
@@ -45,7 +45,6 @@ import java.io.InputStreamReader
|
||||
import java.util.Calendar
|
||||
import kotlin.time.Duration.Companion.days
|
||||
|
||||
@Suppress("LongParameterList") // legacy code
|
||||
class ContactsBackupWork(
|
||||
appContext: Context,
|
||||
params: WorkerParameters,
|
||||
@@ -66,7 +65,6 @@ class ContactsBackupWork(
|
||||
private var operationsServiceConnection: OperationsServiceConnection? = null
|
||||
private var operationsServiceBinder: OperationsServiceBinder? = null
|
||||
|
||||
@Suppress("ReturnCount") // pre-existing issue
|
||||
override fun doWork(): Result {
|
||||
val accountName = inputData.getString(KEY_ACCOUNT) ?: ""
|
||||
if (TextUtils.isEmpty(accountName)) {
|
||||
|
||||
@@ -46,7 +46,7 @@ class ContactsImportWork(
|
||||
const val SELECTED_CONTACTS_FILE_PATH = "selected_contacts_file_path"
|
||||
}
|
||||
|
||||
@Suppress("ComplexMethod", "NestedBlockDepth", "LongMethod", "ReturnCount") // legacy code
|
||||
@Suppress("CyclomaticComplexMethod", "NestedBlockDepth", "LongMethod") // legacy code
|
||||
override fun doWork(): Result {
|
||||
val vCardFilePath = inputData.getString(VCARD_FILE_PATH) ?: ""
|
||||
val contactsAccountName = inputData.getString(ACCOUNT_NAME)
|
||||
@@ -69,7 +69,6 @@ class ContactsImportWork(
|
||||
val vCards = ArrayList<VCard>()
|
||||
|
||||
var cursor: Cursor? = null
|
||||
@Suppress("TooGenericExceptionCaught") // legacy code
|
||||
try {
|
||||
val operations = ContactOperations(applicationContext, contactsAccountName, contactsAccountType)
|
||||
vCards.addAll(Ezvcard.parse(inputStream).all())
|
||||
@@ -129,7 +128,6 @@ class ContactsImportWork(
|
||||
return Result.success()
|
||||
}
|
||||
|
||||
@Suppress("TooGenericExceptionCaught")
|
||||
fun readCheckedContractsFromFile(file: File): IntArray = try {
|
||||
val fileData = FileUtils.readFileToByteArray(file)
|
||||
fileData.toIntArray()
|
||||
|
||||
@@ -24,7 +24,6 @@ import kotlinx.coroutines.withContext
|
||||
* It fires media detection worker and auto upload worker and finishes immediately.
|
||||
*
|
||||
*/
|
||||
@Suppress("TooGenericExceptionCaught", "LongParameterList")
|
||||
class ContentObserverWork(
|
||||
context: Context,
|
||||
private val params: WorkerParameters,
|
||||
|
||||
@@ -22,7 +22,7 @@ import com.owncloud.android.operations.SynchronizeFolderOperation
|
||||
import com.owncloud.android.utils.FileStorageUtils
|
||||
import java.io.File
|
||||
|
||||
@Suppress("Detekt.NestedBlockDepth", "ReturnCount", "LongParameterList")
|
||||
@Suppress("Detekt.NestedBlockDepth")
|
||||
class InternalTwoWaySyncWork(
|
||||
private val context: Context,
|
||||
params: WorkerParameters,
|
||||
@@ -113,7 +113,6 @@ class InternalTwoWaySyncWork(
|
||||
super.onStopped()
|
||||
}
|
||||
|
||||
@Suppress("TooGenericExceptionCaught")
|
||||
private fun checkFreeSpace(folder: OCFile): Result? {
|
||||
val storagePath = folder.storagePath ?: MainApp.getStoragePath()
|
||||
val file = File(storagePath)
|
||||
|
||||
@@ -48,7 +48,6 @@ import com.owncloud.android.utils.SyncedFolderUtils
|
||||
import com.owncloud.android.utils.theme.ViewThemeUtils
|
||||
import java.util.Random
|
||||
|
||||
@Suppress("LongParameterList") // dependencies injection
|
||||
class MediaFoldersDetectionWork(
|
||||
private val context: Context,
|
||||
params: WorkerParameters,
|
||||
@@ -73,7 +72,7 @@ class MediaFoldersDetectionWork(
|
||||
|
||||
private val randomIdGenerator = Random(clock.currentTime)
|
||||
|
||||
@Suppress("LongMethod", "ComplexMethod", "NestedBlockDepth", "ReturnCount") // legacy code
|
||||
@Suppress("LongMethod", "CyclomaticComplexMethod", "NestedBlockDepth") // legacy code
|
||||
override fun doWork(): Result {
|
||||
val arbitraryDataProvider: ArbitraryDataProvider = ArbitraryDataProviderImpl(context)
|
||||
val gson = Gson()
|
||||
|
||||
@@ -61,7 +61,6 @@ import javax.crypto.BadPaddingException
|
||||
import javax.crypto.Cipher
|
||||
import javax.inject.Inject
|
||||
|
||||
@Suppress("LongParameterList")
|
||||
class NotificationWork constructor(
|
||||
private val context: Context,
|
||||
params: WorkerParameters,
|
||||
@@ -82,7 +81,7 @@ class NotificationWork constructor(
|
||||
private const val NUMERIC_NOTIFICATION_ID = "NUMERIC_NOTIFICATION_ID"
|
||||
}
|
||||
|
||||
@Suppress("TooGenericExceptionCaught", "NestedBlockDepth", "ComplexMethod", "LongMethod") // legacy code
|
||||
@Suppress("NestedBlockDepth", "CyclomaticComplexMethod", "LongMethod") // legacy code
|
||||
override fun doWork(): Result {
|
||||
val subject = inputData.getString(KEY_NOTIFICATION_SUBJECT) ?: ""
|
||||
val signature = inputData.getString(KEY_NOTIFICATION_SIGNATURE) ?: ""
|
||||
@@ -252,7 +251,6 @@ class NotificationWork constructor(
|
||||
}
|
||||
}
|
||||
|
||||
@Suppress("TooGenericExceptionCaught") // legacy code
|
||||
private fun fetchCompleteNotification(account: User, decryptedPushMessage: DecryptedPushMessage) {
|
||||
val optionalUser = accountManager.getUser(account.accountName)
|
||||
if (!optionalUser.isPresent) {
|
||||
@@ -286,7 +284,7 @@ class NotificationWork constructor(
|
||||
this.accountManager = accountManager
|
||||
}
|
||||
|
||||
@Suppress("ComplexMethod") // legacy code
|
||||
@Suppress("CyclomaticComplexMethod") // legacy code
|
||||
override fun onReceive(context: Context, intent: Intent) {
|
||||
AndroidInjection.inject(this, context)
|
||||
val numericNotificationId = intent.getIntExtra(NUMERIC_NOTIFICATION_ID, 0)
|
||||
@@ -341,7 +339,6 @@ class NotificationWork constructor(
|
||||
}
|
||||
}
|
||||
|
||||
@Suppress("ReturnCount") // legacy code
|
||||
private fun executeAction(
|
||||
actionType: String,
|
||||
actionLink: String,
|
||||
|
||||
@@ -27,7 +27,6 @@ import com.owncloud.android.operations.SynchronizeFileOperation
|
||||
import com.owncloud.android.utils.FileStorageUtils
|
||||
import java.io.File
|
||||
|
||||
@Suppress("LongParameterList") // Legacy code
|
||||
class OfflineSyncWork(
|
||||
private val context: Context,
|
||||
params: WorkerParameters,
|
||||
@@ -98,7 +97,6 @@ class OfflineSyncWork(
|
||||
}
|
||||
}
|
||||
// update eTag
|
||||
@Suppress("TooGenericExceptionCaught") // legacy code
|
||||
try {
|
||||
val ocFolder = storageManager.getFileByPath(folderName)
|
||||
ocFolder.etagOnServer = updatedEtag
|
||||
|
||||
@@ -23,7 +23,7 @@ import java.nio.file.Paths
|
||||
import java.nio.file.SimpleFileVisitor
|
||||
import java.nio.file.attribute.BasicFileAttributes
|
||||
|
||||
@Suppress("TooGenericExceptionCaught", "MagicNumber", "ReturnCount")
|
||||
@Suppress("MagicNumber")
|
||||
class AutoUploadHelper(private val repository: FileSystemRepository) {
|
||||
companion object {
|
||||
private const val TAG = "AutoUploadHelper"
|
||||
|
||||
@@ -57,7 +57,6 @@ import java.io.File
|
||||
import kotlin.coroutines.cancellation.CancellationException
|
||||
import kotlin.time.Duration.Companion.milliseconds
|
||||
|
||||
@Suppress("LongParameterList", "TooManyFunctions", "TooGenericExceptionCaught")
|
||||
class AutoUploadWorker(
|
||||
private val context: Context,
|
||||
params: WorkerParameters,
|
||||
@@ -90,7 +89,6 @@ class AutoUploadWorker(
|
||||
private val overridePowerSaving: Boolean
|
||||
get() = inputData.getBoolean(OVERRIDE_POWER_SAVING, false)
|
||||
|
||||
@Suppress("ReturnCount")
|
||||
override suspend fun doWork(): Result {
|
||||
return try {
|
||||
trySetForeground()
|
||||
@@ -178,7 +176,6 @@ class AutoUploadWorker(
|
||||
.setSilent(true)
|
||||
.build()
|
||||
|
||||
@Suppress("TooGenericExceptionCaught")
|
||||
private fun getStartNotificationTitle(): Pair<String, String>? = try {
|
||||
val localPath = syncedFolder.localPath
|
||||
val remotePath = syncedFolder.remotePath
|
||||
@@ -195,7 +192,6 @@ class AutoUploadWorker(
|
||||
null
|
||||
}
|
||||
|
||||
@Suppress("ReturnCount")
|
||||
private fun isBlocked(syncedFolderID: Long): Boolean {
|
||||
if (powerManagementService.blocksAutoUpload && !overridePowerSaving) {
|
||||
Log_OC.w(TAG, "⚡ Skipping: device is in power saving mode")
|
||||
@@ -268,7 +264,7 @@ class AutoUploadWorker(
|
||||
}
|
||||
}
|
||||
|
||||
@Suppress("LongMethod", "DEPRECATION", "TooGenericExceptionCaught")
|
||||
@Suppress("LongMethod", "DEPRECATION", "CyclomaticComplexMethod")
|
||||
private suspend fun uploadFiles(syncedFolder: SyncedFolder) = withContext(Dispatchers.IO) {
|
||||
val user = getUserOrReturn(syncedFolder) ?: return@withContext
|
||||
val ocAccount = OwnCloudAccount(user.toPlatformAccount(), context)
|
||||
@@ -425,7 +421,6 @@ class AutoUploadWorker(
|
||||
return lastUploadResult in conflictResults && syncedFolder.nameCollisionPolicy != NameCollisionPolicy.ASK_USER
|
||||
}
|
||||
|
||||
@Suppress("ReturnCount")
|
||||
private fun getEntityResult(
|
||||
user: User,
|
||||
localPath: String,
|
||||
|
||||
@@ -26,7 +26,7 @@ import java.util.zip.CRC32
|
||||
import com.nextcloud.utils.AppConstants.BYTES_PER_KB
|
||||
import com.nextcloud.utils.AppConstants.MILLIS_PER_SECOND
|
||||
|
||||
@Suppress("TooGenericExceptionCaught", "NestedBlockDepth", "MagicNumber", "ReturnCount")
|
||||
@Suppress("NestedBlockDepth", "MagicNumber")
|
||||
class FileSystemRepository(
|
||||
private val dao: FileSystemDao,
|
||||
private val uploadsStorageManager: UploadsStorageManager,
|
||||
|
||||
@@ -85,7 +85,6 @@ class SyncFolderHelper(private val context: Context) {
|
||||
if (MediaFolderType.IMAGE == syncedFolder.type && hasExif(file)) {
|
||||
Log_OC.d(TAG, "calculateLastModificationTime exif found")
|
||||
|
||||
@Suppress("TooGenericExceptionCaught")
|
||||
try {
|
||||
val exifInterface = ExifInterface(file.absolutePath)
|
||||
val exifDate = exifInterface.getAttribute(ExifInterface.TAG_DATETIME)
|
||||
|
||||
@@ -22,7 +22,6 @@ class ClipboardClearWorker(private val context: Context, params: WorkerParameter
|
||||
const val CLIPBOARD_TEXT = "clipboard_text"
|
||||
}
|
||||
|
||||
@Suppress("TooGenericExceptionCaught", "ReturnCount")
|
||||
override fun doWork(): Result {
|
||||
try {
|
||||
val clipboardManager = context.getSystemService(Context.CLIPBOARD_SERVICE) as ClipboardManager
|
||||
|
||||
@@ -18,7 +18,7 @@ import com.owncloud.android.ui.notifications.NotificationUtils
|
||||
import com.owncloud.android.utils.theme.ViewThemeUtils
|
||||
import java.security.SecureRandom
|
||||
|
||||
@Suppress("TooManyFunctions", "MagicNumber")
|
||||
@Suppress("MagicNumber")
|
||||
class DownloadNotificationManager(id: Int, private val context: Context, viewThemeUtils: ViewThemeUtils) :
|
||||
WorkerNotificationManager(
|
||||
id,
|
||||
|
||||
@@ -112,7 +112,6 @@ class FileDownloadHelper {
|
||||
downloadFile(user, file, downloadType = DownloadType.DOWNLOAD)
|
||||
}
|
||||
|
||||
@Suppress("LongParameterList")
|
||||
fun downloadFile(
|
||||
user: User,
|
||||
ocFile: OCFile,
|
||||
|
||||
@@ -42,7 +42,6 @@ import java.util.Optional
|
||||
import java.util.Vector
|
||||
import kotlin.random.Random
|
||||
|
||||
@Suppress("LongParameterList", "TooManyFunctions", "TooGenericExceptionCaught")
|
||||
class FileDownloadWorker(
|
||||
viewThemeUtils: ViewThemeUtils,
|
||||
private val accountManager: UserAccountManager,
|
||||
@@ -100,7 +99,6 @@ class FileDownloadWorker(
|
||||
|
||||
private var downloadError: FileDownloadError? = null
|
||||
|
||||
@Suppress("ReturnCount")
|
||||
override suspend fun doWork(): Result {
|
||||
return try {
|
||||
setUser()
|
||||
@@ -245,7 +243,7 @@ class FileDownloadWorker(
|
||||
am.addOnAccountsUpdatedListener(this, null, false)
|
||||
}
|
||||
|
||||
@Suppress("TooGenericExceptionCaught", "DEPRECATION")
|
||||
@Suppress("DEPRECATION")
|
||||
private suspend fun downloadFile(downloadKey: String) {
|
||||
currentDownload = pendingDownloads.get(downloadKey)
|
||||
|
||||
|
||||
@@ -88,7 +88,6 @@ class SendShareDownloader(
|
||||
fileWaitingToSend = savedInstanceState?.getParcelableArgument(KEY_FILE_WAITING_TO_SEND, OCFile::class.java)
|
||||
}
|
||||
|
||||
@Suppress("ReturnCount")
|
||||
private fun onDownloadCompleted(intent: Intent) {
|
||||
val waitingToSend = fileWaitingToSend ?: return
|
||||
|
||||
|
||||
-49
@@ -1,49 +0,0 @@
|
||||
/*
|
||||
* Nextcloud - Android Client
|
||||
*
|
||||
* SPDX-FileCopyrightText: 2026 Alper Ozturk <alper.ozturk@nextcloud.com>
|
||||
* SPDX-License-Identifier: AGPL-3.0-or-later
|
||||
*/
|
||||
|
||||
package com.nextcloud.client.jobs.folderDownload
|
||||
|
||||
import android.content.Context
|
||||
import android.content.Intent
|
||||
import androidx.localbroadcastmanager.content.LocalBroadcastManager
|
||||
import com.owncloud.android.lib.common.utils.Log_OC
|
||||
|
||||
class FolderDownloadEventBroadcaster(
|
||||
private val context: Context,
|
||||
private val broadcastManager: LocalBroadcastManager
|
||||
) {
|
||||
companion object {
|
||||
private const val TAG = "📣" + "FolderDownloadBroadcastManager"
|
||||
|
||||
private const val PREFIX = "com.nextcloud.client.folderDownload."
|
||||
|
||||
const val ACTION_DOWNLOAD_ENQUEUED = PREFIX + "ACTION_DOWNLOAD_ENQUEUED"
|
||||
const val ACTION_DOWNLOAD_COMPLETED = PREFIX + "ACTION_DOWNLOAD_COMPLETED"
|
||||
|
||||
const val EXTRA_FILE_ID = PREFIX + "EXTRA_FILE_ID"
|
||||
}
|
||||
|
||||
fun sendDownloadEnqueued(id: Long) {
|
||||
Log_OC.d(TAG, "Download enqueued broadcast sent")
|
||||
|
||||
val intent = Intent(ACTION_DOWNLOAD_ENQUEUED).apply {
|
||||
putExtra(EXTRA_FILE_ID, id)
|
||||
}
|
||||
|
||||
broadcastManager.sendBroadcast(intent)
|
||||
}
|
||||
|
||||
fun sendDownloadCompleted(id: Long) {
|
||||
Log_OC.d(TAG, "Download completed broadcast sent")
|
||||
|
||||
val intent = Intent(ACTION_DOWNLOAD_COMPLETED).apply {
|
||||
putExtra(EXTRA_FILE_ID, id)
|
||||
}
|
||||
|
||||
broadcastManager.sendBroadcast(intent)
|
||||
}
|
||||
}
|
||||
+19
-14
@@ -8,12 +8,14 @@
|
||||
package com.nextcloud.client.jobs.folderDownload
|
||||
|
||||
import android.content.Context
|
||||
import androidx.localbroadcastmanager.content.LocalBroadcastManager
|
||||
import androidx.work.CoroutineWorker
|
||||
import androidx.work.ForegroundInfo
|
||||
import androidx.work.WorkerParameters
|
||||
import androidx.work.workDataOf
|
||||
import com.nextcloud.client.account.UserAccountManager
|
||||
import com.nextcloud.client.jobs.BackgroundJobManagerImpl
|
||||
import com.nextcloud.client.jobs.download.FileDownloadHelper
|
||||
import com.nextcloud.utils.AppConstants
|
||||
import com.owncloud.android.datamodel.FileDataStorageManager
|
||||
import com.owncloud.android.datamodel.OCFile
|
||||
import com.owncloud.android.lib.common.OwnCloudClientManagerFactory
|
||||
@@ -30,12 +32,11 @@ import java.util.concurrent.ConcurrentHashMap
|
||||
/**
|
||||
* Only used for downloading files in first level of the folder, not subfolders.
|
||||
*/
|
||||
@Suppress("LongMethod", "TooGenericExceptionCaught", "MagicNumber")
|
||||
@Suppress("LongMethod", "MagicNumber")
|
||||
class FolderDownloadWorker(
|
||||
private val accountManager: UserAccountManager,
|
||||
private val context: Context,
|
||||
viewThemeUtils: ViewThemeUtils,
|
||||
localBroadcastManager: LocalBroadcastManager,
|
||||
params: WorkerParameters
|
||||
) : CoroutineWorker(context, params) {
|
||||
|
||||
@@ -43,15 +44,20 @@ class FolderDownloadWorker(
|
||||
private const val TAG = "📂" + "FolderDownloadWorker"
|
||||
const val FOLDER_ID = "FOLDER_ID"
|
||||
const val ACCOUNT_NAME = "ACCOUNT_NAME"
|
||||
const val FILE_ID = "FILE_ID"
|
||||
const val PREVIOUS_FILE_ID = "PREVIOUS_FILE_ID"
|
||||
const val IS_FOLDER_DOWNLOADED = "IS_FOLDER_DOWNLOADED"
|
||||
private val pendingDownloads: MutableSet<Long> = ConcurrentHashMap.newKeySet()
|
||||
fun isDownloading(id: Long): Boolean = pendingDownloads.contains(id)
|
||||
fun formatTag(folderId: Long): String = BackgroundJobManagerImpl.JOB_DOWNLOAD_FOLDER + folderId
|
||||
fun formatParentTag(parentId: Long): String =
|
||||
BackgroundJobManagerImpl.JOB_DOWNLOAD_FOLDER + "_parent_" + parentId
|
||||
}
|
||||
|
||||
private val notificationManager = FolderDownloadWorkerNotificationManager(context, true, viewThemeUtils)
|
||||
private val folderDownloadEventBroadcaster = FolderDownloadEventBroadcaster(context, localBroadcastManager)
|
||||
private lateinit var storageManager: FileDataStorageManager
|
||||
|
||||
@Suppress("ReturnCount", "DEPRECATION")
|
||||
@Suppress("DEPRECATION")
|
||||
override suspend fun doWork(): Result {
|
||||
val folderID = inputData.getLong(FOLDER_ID, -1)
|
||||
if (folderID == -1L) {
|
||||
@@ -82,7 +88,6 @@ class FolderDownloadWorker(
|
||||
Log_OC.d(TAG, "🕒 started for ${user.accountName} | folder=${folder.fileName}")
|
||||
|
||||
trySetForeground(folder)
|
||||
folderDownloadEventBroadcaster.sendDownloadEnqueued(folder.fileId)
|
||||
pendingDownloads.add(folder.fileId)
|
||||
|
||||
val downloadHelper = FileDownloadHelper.instance()
|
||||
@@ -100,6 +105,7 @@ class FolderDownloadWorker(
|
||||
}
|
||||
|
||||
var overallSuccess = true
|
||||
var previousFileId: Long? = null
|
||||
|
||||
files.forEachIndexed { index, file ->
|
||||
if (isStopped) {
|
||||
@@ -119,6 +125,7 @@ class FolderDownloadWorker(
|
||||
files.size
|
||||
)
|
||||
|
||||
setProgress(workDataOf(FILE_ID to file.fileId, PREVIOUS_FILE_ID to previousFileId))
|
||||
val operation = DownloadFileOperation(user, file, context)
|
||||
val operationResult = operation.execute(client)
|
||||
|
||||
@@ -132,6 +139,7 @@ class FolderDownloadWorker(
|
||||
Log_OC.w(TAG, "⚠️ download failed for ${file.remotePath}: ${operationResult?.logMessage}")
|
||||
overallSuccess = false
|
||||
}
|
||||
previousFileId = file.fileId
|
||||
}
|
||||
|
||||
notificationManager.showCompletionNotification(folder.fileName, overallSuccess)
|
||||
@@ -148,17 +156,16 @@ class FolderDownloadWorker(
|
||||
notificationManager.showCompletionNotification(folder.fileName, false)
|
||||
Result.failure()
|
||||
} finally {
|
||||
folderDownloadEventBroadcaster.sendDownloadCompleted(folder.fileId)
|
||||
pendingDownloads.remove(folder.fileId)
|
||||
setProgress(workDataOf(IS_FOLDER_DOWNLOADED to true))
|
||||
|
||||
// delay so that user can see the error or success notification
|
||||
delay(2000)
|
||||
delay(AppConstants.TWO_SECOND)
|
||||
notificationManager.dismiss()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Suppress("ReturnCount")
|
||||
override suspend fun getForegroundInfo(): ForegroundInfo {
|
||||
return try {
|
||||
val folderID = inputData.getLong(FOLDER_ID, -1)
|
||||
@@ -187,12 +194,10 @@ class FolderDownloadWorker(
|
||||
}
|
||||
}
|
||||
|
||||
private fun getOCFile(operation: DownloadFileOperation): OCFile? = operation.file?.fileId?.let {
|
||||
storageManager.getFileById(it)
|
||||
}
|
||||
?: storageManager.getFileByDecryptedRemotePath(operation.file?.remotePath)
|
||||
private fun getOCFile(operation: DownloadFileOperation): OCFile? = storageManager.getFileById(operation.file.fileId)
|
||||
?: storageManager.getFileByDecryptedRemotePath(operation.file.remotePath)
|
||||
?: run {
|
||||
Log_OC.e(TAG, "could not resolve OCFile for save: ${operation.file?.remotePath}")
|
||||
Log_OC.e(TAG, "could not resolve OCFile for save: ${operation.file.remotePath}")
|
||||
null
|
||||
}
|
||||
|
||||
|
||||
@@ -8,12 +8,10 @@
|
||||
package com.nextcloud.client.jobs.gallery
|
||||
|
||||
import android.graphics.Bitmap
|
||||
import android.graphics.Point
|
||||
import android.media.ThumbnailUtils
|
||||
import android.os.Build
|
||||
import android.provider.MediaStore
|
||||
import android.util.Size
|
||||
import android.view.WindowManager
|
||||
import android.widget.ImageView
|
||||
import com.nextcloud.client.account.User
|
||||
import com.nextcloud.utils.extensions.getBigThumbnailKey
|
||||
@@ -21,6 +19,8 @@ import com.nextcloud.utils.extensions.getSmallThumbnail
|
||||
import com.nextcloud.utils.extensions.isPNG
|
||||
import com.nextcloud.utils.extensions.setMediaThumbnail
|
||||
import com.nextcloud.utils.extensions.toFile
|
||||
import com.nextcloud.utils.thumbnail.ResizedImageGenerator
|
||||
import com.nextcloud.utils.view.ScreenMetrics
|
||||
import com.owncloud.android.MainApp
|
||||
import com.owncloud.android.datamodel.FileDataStorageManager
|
||||
import com.owncloud.android.datamodel.OCFile
|
||||
@@ -37,7 +37,7 @@ import kotlinx.coroutines.withContext
|
||||
import java.util.Collections
|
||||
import java.util.WeakHashMap
|
||||
|
||||
@Suppress("DEPRECATION", "TooGenericExceptionCaught", "ReturnCount")
|
||||
@Suppress("DEPRECATION")
|
||||
class GalleryImageGenerationJob(private val user: User, private val storageManager: FileDataStorageManager) {
|
||||
|
||||
companion object {
|
||||
@@ -142,9 +142,7 @@ class GalleryImageGenerationJob(private val user: User, private val storageManag
|
||||
}
|
||||
|
||||
private fun createImageThumbnail(file: OCFile): Bitmap? {
|
||||
val wm = MainApp.getAppContext().getSystemService(android.content.Context.WINDOW_SERVICE) as WindowManager
|
||||
val p = Point()
|
||||
wm.defaultDisplay.getSize(p)
|
||||
val p = ScreenMetrics.size()
|
||||
|
||||
val pxW = p.x
|
||||
val pxH = p.y
|
||||
@@ -185,7 +183,7 @@ class GalleryImageGenerationJob(private val user: User, private val storageManag
|
||||
.getClientFor(user.toOwnCloudAccount(), MainApp.getAppContext())
|
||||
}
|
||||
ThumbnailsCacheManager.setClient(client)
|
||||
ThumbnailsCacheManager.doResizedImageInBackground(file, storageManager)
|
||||
ResizedImageGenerator.getOrCreate(file, client, storageManager)
|
||||
} catch (t: Throwable) {
|
||||
Log_OC.e(TAG, "Server fetch failed for $file", t)
|
||||
null
|
||||
|
||||
@@ -19,7 +19,7 @@ import com.owncloud.android.operations.RefreshFolderOperation
|
||||
import kotlinx.coroutines.Dispatchers
|
||||
import kotlinx.coroutines.withContext
|
||||
|
||||
@Suppress("DEPRECATION", "ReturnCount", "TooGenericExceptionCaught")
|
||||
@Suppress("DEPRECATION")
|
||||
class MetadataWorker(private val context: Context, params: WorkerParameters, private val user: User) :
|
||||
CoroutineWorker(context, params) {
|
||||
|
||||
|
||||
+1
-3
@@ -57,7 +57,6 @@ class OfflineOperationsWorker(
|
||||
private val notificationManager = OfflineOperationsNotificationManager(context, viewThemeUtils)
|
||||
private var repository = OfflineOperationsRepository(fileDataStorageManager)
|
||||
|
||||
@Suppress("TooGenericExceptionCaught")
|
||||
override suspend fun doWork(): Result = withContext(Dispatchers.IO) {
|
||||
try {
|
||||
val jobName = inputData.getString(JOB_NAME)
|
||||
@@ -92,7 +91,6 @@ class OfflineOperationsWorker(
|
||||
}
|
||||
|
||||
// region Handle offline operations
|
||||
@Suppress("TooGenericExceptionCaught")
|
||||
private suspend fun processOperations(operations: List<OfflineOperationEntity>, client: OwnCloudClient) {
|
||||
val totalOperationSize = operations.size
|
||||
operations.forEachIndexed { index, operation ->
|
||||
@@ -183,7 +181,7 @@ class OfflineOperationsWorker(
|
||||
}
|
||||
|
||||
// region Operation Execution
|
||||
@Suppress("ComplexCondition", "LongMethod")
|
||||
@Suppress("ComplexCondition", "LongMethod", "CyclomaticComplexMethod")
|
||||
private suspend fun executeOperation(
|
||||
operation: OfflineOperationEntity,
|
||||
client: OwnCloudClient
|
||||
|
||||
Loaded 100 of 430 files, more files were not shown because too many files have changed in this diff.
Show more
Reference in new issue
Block a user