Skip to content

Commit 35b5d42

Browse files
authored
Merge branch 'nextcloud:master' into master
2 parents ab90d98 + e3e0264 commit 35b5d42

File tree

121 files changed

+2713
-1330
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

121 files changed

+2713
-1330
lines changed

.devcontainer/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM ubuntu:noble@sha256:c4570d2f4665d5d118ae29fb494dee4f8db8fcfaee0e37a2e19b827f399070d3
1+
FROM ubuntu:noble@sha256:a08e551cb33850e4740772b38217fc1796a66da2506d312abe51acda354ff061
22

33
ARG DEBIAN_FRONTEND=noninteractive
44
ENV ANDROID_HOME=/usr/lib/android-sdk

.github/workflows/codeql.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ jobs:
4343
with:
4444
swap-size-gb: 10
4545
- name: Initialize CodeQL
46-
uses: github/codeql-action/init@181d5eefc20863364f96762470ba6f862bdef56b # v3.29.2
46+
uses: github/codeql-action/init@4e828ff8d448a8a6e532957b1811f387a63867e8 # v3.29.4
4747
with:
4848
languages: ${{ matrix.language }}
4949
- name: Set up JDK 17
@@ -57,4 +57,4 @@ jobs:
5757
echo "org.gradle.jvmargs=-Xmx4g -XX:MaxMetaspaceSize=512m -XX:+HeapDumpOnOutOfMemoryError" > "$HOME/.gradle/gradle.properties"
5858
./gradlew assembleDebug
5959
- name: Perform CodeQL Analysis
60-
uses: github/codeql-action/analyze@181d5eefc20863364f96762470ba6f862bdef56b # v3.29.2
60+
uses: github/codeql-action/analyze@4e828ff8d448a8a6e532957b1811f387a63867e8 # v3.29.4

.github/workflows/scorecard.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,6 @@ jobs:
4242

4343
# Upload the results to GitHub's code scanning dashboard.
4444
- name: "Upload to code-scanning"
45-
uses: github/codeql-action/upload-sarif@181d5eefc20863364f96762470ba6f862bdef56b # v3.29.2
45+
uses: github/codeql-action/upload-sarif@4e828ff8d448a8a6e532957b1811f387a63867e8 # v3.29.4
4646
with:
4747
sarif_file: results.sarif

app/build.gradle

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -312,14 +312,14 @@ dependencies {
312312
implementation "androidx.webkit:webkit:1.14.0"
313313
implementation "androidx.cardview:cardview:1.0.0"
314314
implementation "androidx.exifinterface:exifinterface:1.4.1"
315-
implementation "androidx.lifecycle:lifecycle-viewmodel-ktx:2.9.1"
316-
implementation "androidx.lifecycle:lifecycle-service:2.9.1"
315+
implementation "androidx.lifecycle:lifecycle-viewmodel-ktx:2.9.2"
316+
implementation "androidx.lifecycle:lifecycle-service:2.9.2"
317317
implementation "androidx.work:work-runtime:$workRuntime"
318318
implementation "androidx.work:work-runtime-ktx:$workRuntime"
319319
implementation "androidx.fragment:fragment-ktx:1.8.8"
320320
implementation "com.github.albfernandez:juniversalchardet:2.5.0" // need this version for Android <7
321321
compileOnly "com.google.code.findbugs:annotations:3.0.1u2"
322-
implementation "commons-io:commons-io:2.19.0"
322+
implementation "commons-io:commons-io:2.20.0"
323323
implementation "org.greenrobot:eventbus:3.3.1"
324324
implementation "com.googlecode.ez-vcard:ez-vcard:0.12.1"
325325
implementation "org.lukhnos:nnio:0.3.1"
@@ -334,15 +334,15 @@ dependencies {
334334
implementation "com.caverock:androidsvg:1.4"
335335
implementation "androidx.annotation:annotation:1.9.1"
336336
implementation "com.vanniktech:emoji-google:0.21.0"
337-
implementation("androidx.lifecycle:lifecycle-runtime-ktx:2.9.1")
337+
implementation("androidx.lifecycle:lifecycle-runtime-ktx:2.9.2")
338338

339339
// document scanner not available on FDroid (generic) due to OpenCV binaries
340340
gplayImplementation project(":appscan")
341341
huaweiImplementation project(":appscan")
342342
qaImplementation project(":appscan")
343343

344344
spotbugsPlugins "com.h3xstream.findsecbugs:findsecbugs-plugin:1.14.0"
345-
spotbugsPlugins "com.mebigfatguy.fb-contrib:fb-contrib:7.6.11"
345+
spotbugsPlugins "com.mebigfatguy.fb-contrib:fb-contrib:7.6.12"
346346

347347
implementation "com.google.dagger:dagger:$daggerVersion"
348348
implementation "com.google.dagger:dagger-android:$daggerVersion"
257 Bytes
Loading

app/src/androidTest/java/com/nextcloud/utils/SharePermissionManagerTest.kt

Lines changed: 14 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -7,15 +7,14 @@
77

88
package com.nextcloud.utils
99

10-
import com.google.gson.Gson
1110
import com.owncloud.android.datamodel.quickPermission.QuickPermissionType
1211
import com.owncloud.android.lib.resources.shares.OCShare
1312
import com.owncloud.android.lib.resources.shares.ShareType
14-
import com.owncloud.android.lib.resources.shares.attributes.ShareAttributes
13+
import com.owncloud.android.lib.resources.shares.extensions.isAllowDownloadAndSyncEnabled
14+
import com.owncloud.android.lib.resources.shares.extensions.toggleAllowDownloadAndSync
1515
import com.owncloud.android.ui.fragment.util.SharePermissionManager
1616
import junit.framework.TestCase.assertEquals
1717
import junit.framework.TestCase.assertFalse
18-
import junit.framework.TestCase.assertNotNull
1918
import junit.framework.TestCase.assertTrue
2019
import org.junit.Test
2120

@@ -251,17 +250,23 @@ class SharePermissionManagerTest {
251250
// region Attributes Tests
252251
@Test
253252
fun testToggleAllowDownloadAndSyncShouldCreateAttributeJsonIfNoneExists() {
254-
val json = SharePermissionManager.toggleAllowDownloadAndSync(true, null)
255-
assertNotNull(json)
256-
val downloadAttribute = ShareAttributes.createDownloadAttributes(true)
257-
val expectedJson = Gson().toJson(listOf(downloadAttribute))
258-
assertEquals(json, expectedJson)
253+
val ocShare = OCShare().apply {
254+
isFolder = true
255+
shareType = ShareType.USER
256+
permissions = 17
257+
}
258+
ocShare.attributes = toggleAllowDownloadAndSync(
259+
ocShare.attributes,
260+
isChecked = true,
261+
useV2DownloadAttributes = false
262+
)
263+
assertTrue(ocShare.isAllowDownloadAndSyncEnabled(false))
259264
}
260265

261266
@Test
262267
fun testIsAllowDownloadAndSyncEnabledShouldReturnFalseIfAttributeIsMissing() {
263268
val share = createShare(OCShare.READ_PERMISSION_FLAG, attributesJson = null)
264-
assertFalse(SharePermissionManager.isAllowDownloadAndSyncEnabled(share))
269+
assertFalse(share.isAllowDownloadAndSyncEnabled(false))
265270
}
266271
// endregion
267272
}

app/src/androidTest/java/com/owncloud/android/ScreenshotsIT.java

Lines changed: 0 additions & 137 deletions
This file was deleted.

0 commit comments

Comments
 (0)