Skip to content

Commit db8bc04

Browse files
committed
Merge master
Signed-off-by: alperozturk <[email protected]>
2 parents 6c19067 + 760fdcd commit db8bc04

File tree

194 files changed

+5669
-5598
lines changed

Some content is hidden

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

194 files changed

+5669
-5598
lines changed

.devcontainer/devcontainer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
{
22
"name": "NextcloudAndroid",
3-
"dockerFile": "Dockerfile",
3+
"dockerFile": "Dockerfile"
44
}

.github/workflows/assembleFlavors.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ jobs:
1919
matrix:
2020
flavor: [ Generic, Gplay, Huawei ]
2121
steps:
22-
- uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v3
22+
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v3
2323
- name: set up JDK 17
2424
uses: actions/setup-java@0ab4596768b603586c0de567f2430c30f5b0d2b0 # v3
2525
with:

.github/workflows/check.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ jobs:
1919
matrix:
2020
task: [ detekt, spotlessKotlinCheck ]
2121
steps:
22-
- uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v3
22+
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v3
2323
- name: Set up JDK 17
2424
uses: actions/setup-java@0ab4596768b603586c0de567f2430c30f5b0d2b0 # v3
2525
with:

.github/workflows/codeql.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ jobs:
3232
with:
3333
swap-size-gb: 10
3434
- name: Initialize CodeQL
35-
uses: github/codeql-action/init@0116bc2df50751f9724a2e35ef1f24d22f90e4e1 # v2.22.3
35+
uses: github/codeql-action/init@74483a38d39275f33fcff5f35b679b5ca4a26a99 # v2.22.5
3636
with:
3737
languages: ${{ matrix.language }}
3838
- name: Set up JDK 17
@@ -46,4 +46,4 @@ jobs:
4646
echo "org.gradle.jvmargs=-Xmx2g -XX:MaxMetaspaceSize=512m -XX:+HeapDumpOnOutOfMemoryError" > "$HOME/.gradle/gradle.properties"
4747
./gradlew assembleDebug
4848
- name: Perform CodeQL Analysis
49-
uses: github/codeql-action/analyze@0116bc2df50751f9724a2e35ef1f24d22f90e4e1 # v2.22.3
49+
uses: github/codeql-action/analyze@74483a38d39275f33fcff5f35b679b5ca4a26a99 # v2.22.5

.github/workflows/command-rebase.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,15 +23,15 @@ jobs:
2323

2424
steps:
2525
- name: Add reaction on start
26-
uses: peter-evans/create-or-update-comment@c6c9a1a66007646a28c153e2a8580a5bad27bcfa # v3.0.2
26+
uses: peter-evans/create-or-update-comment@23ff15729ef2fc348714a3bb66d2f655ca9066f2 # v3.1.0
2727
with:
2828
token: ${{ secrets.COMMAND_BOT_PAT }}
2929
repository: ${{ github.event.repository.full_name }}
3030
comment-id: ${{ github.event.comment.id }}
3131
reaction-type: "+1"
3232

3333
- name: Checkout the latest code
34-
uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0
34+
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
3535
with:
3636
fetch-depth: 0
3737
token: ${{ secrets.COMMAND_BOT_PAT }}
@@ -42,7 +42,7 @@ jobs:
4242
GITHUB_TOKEN: ${{ secrets.COMMAND_BOT_PAT }}
4343

4444
- name: Add reaction on failure
45-
uses: peter-evans/create-or-update-comment@c6c9a1a66007646a28c153e2a8580a5bad27bcfa # v3.0.2
45+
uses: peter-evans/create-or-update-comment@23ff15729ef2fc348714a3bb66d2f655ca9066f2 # v3.1.0
4646
if: failure()
4747
with:
4848
token: ${{ secrets.COMMAND_BOT_PAT }}

.github/workflows/detectWrongSettings.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ jobs:
1616
runs-on: ubuntu-22.04
1717

1818
steps:
19-
- uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v3
19+
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v3
2020
- name: Set up JDK 17
2121
uses: actions/setup-java@0ab4596768b603586c0de567f2430c30f5b0d2b0 # v3
2222
with:

.github/workflows/qa.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ jobs:
1919
- name: Check if secrets are available
2020
run: echo "::set-output name=ok::${{ secrets.KS_PASS != '' }}"
2121
id: check-secrets
22-
- uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v3
22+
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v3
2323
if: ${{ steps.check-secrets.outputs.ok == 'true' }}
2424
- name: set up JDK 17
2525
uses: actions/setup-java@0ab4596768b603586c0de567f2430c30f5b0d2b0 # v3

.github/workflows/scorecard.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,14 +29,14 @@ jobs:
2929
persist-credentials: false
3030

3131
- name: "Run analysis"
32-
uses: ossf/scorecard-action@483ef80eb98fb506c348f7d62e28055e49fe2398 # v2.3.0
32+
uses: ossf/scorecard-action@0864cf19026789058feabb7e87baa5f140aac736 # v2.3.1
3333
with:
3434
results_file: results.sarif
3535
results_format: sarif
3636
publish_results: false
3737

3838
# Upload the results to GitHub's code scanning dashboard.
3939
- name: "Upload to code-scanning"
40-
uses: github/codeql-action/upload-sarif@0116bc2df50751f9724a2e35ef1f24d22f90e4e1 # v2.22.3
40+
uses: github/codeql-action/upload-sarif@74483a38d39275f33fcff5f35b679b5ca4a26a99 # v2.22.5
4141
with:
4242
sarif_file: results.sarif

.github/workflows/screenShotTest.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ jobs:
2222
color: [ blue ]
2323
api-level: [ 27 ]
2424
steps:
25-
- uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v3
25+
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v3
2626

2727
- name: Gradle cache
2828
uses: actions/cache@704facf57e6136b1bc63b828d79edcd491f0ee84 # v3

.github/workflows/unit-tests.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ jobs:
1818
test:
1919
runs-on: ubuntu-latest
2020
steps:
21-
- uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0
21+
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
2222
- name: Set up JDK 17
2323
uses: actions/setup-java@0ab4596768b603586c0de567f2430c30f5b0d2b0 # v3.13.0
2424
with:

CHANGELOG.md

Lines changed: 22 additions & 1 deletion

CONTRIBUTING.md

Lines changed: 1 addition & 1 deletion

SETUP.md

Lines changed: 1 addition & 1 deletion

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

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@
77
import android.app.Activity;
88
import android.content.ActivityNotFoundException;
99
import android.content.Context;
10+
import android.content.res.Configuration;
11+
import android.content.res.Resources;
1012
import android.os.Build;
1113
import android.os.Bundle;
1214
import android.text.TextUtils;
@@ -58,6 +60,7 @@
5860
import java.io.IOException;
5961
import java.io.InputStream;
6062
import java.util.Collection;
63+
import java.util.Locale;
6164
import java.util.Objects;
6265

6366
import androidx.annotation.NonNull;
@@ -403,6 +406,22 @@ public boolean isPowerSavingExclusionAvailable() {
403406
assertTrue(result.getLogMessage(), result.isSuccess());
404407
}
405408

409+
protected void enableRTL() {
410+
Locale locale = new Locale("ar");
411+
Resources resources = InstrumentationRegistry.getInstrumentation().getTargetContext().getResources();
412+
Configuration config = resources.getConfiguration();
413+
config.setLocale(locale);
414+
resources.updateConfiguration(config, null);
415+
}
416+
417+
protected void resetLocale() {
418+
Locale locale = new Locale("en");
419+
Resources resources = InstrumentationRegistry.getInstrumentation().getTargetContext().getResources();
420+
Configuration config = resources.getConfiguration();
421+
config.setLocale(locale);
422+
resources.updateConfiguration(config, null);
423+
}
424+
406425
protected void screenshot(View view) {
407426
screenshot(view, "");
408427
}

app/src/androidTest/java/com/owncloud/android/ui/activity/FolderPickerActivityIT.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ public void open() {
130130
sut.setFile(origin);
131131

132132
sut.runOnUiThread(() -> {
133-
sut.findViewById(R.id.folder_picker_btn_choose).requestFocus();
133+
sut.findViewById(R.id.folder_picker_btn_copy).requestFocus();
134134
});
135135
waitForIdleSync();
136136
screenshot(sut);

app/src/androidTest/java/com/owncloud/android/ui/dialog/DialogFragmentIT.java

Lines changed: 34 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,7 @@
9292
import androidx.annotation.NonNull;
9393
import androidx.fragment.app.DialogFragment;
9494
import androidx.test.espresso.intent.rule.IntentsTestRule;
95+
import androidx.test.rule.GrantPermissionRule;
9596
import kotlin.Unit;
9697

9798
import static androidx.test.platform.app.InstrumentationRegistry.getInstrumentation;
@@ -107,7 +108,7 @@ private FileDisplayActivity getFileDisplayActivity() {
107108
Intent intent = new Intent(targetContext, FileDisplayActivity.class);
108109
return activityRule.launchActivity(intent);
109110
}
110-
111+
111112

112113
@After
113114
public void quitLooperIfNeeded() {
@@ -134,6 +135,38 @@ public void testLoadingDialog() {
134135
showDialog(dialog);
135136
}
136137

138+
@Test
139+
@ScreenshotTest
140+
public void testConfirmationDialogWithOneAction() {
141+
ConfirmationDialogFragment dialog = ConfirmationDialogFragment.newInstance(R.string.upload_list_empty_text_auto_upload, new String[]{}, R.string.filedetails_sync_file, R.string.common_ok, -1, -1);
142+
showDialog(dialog);
143+
}
144+
145+
@Test
146+
@ScreenshotTest
147+
public void testConfirmationDialogWithTwoAction() {
148+
ConfirmationDialogFragment dialog = ConfirmationDialogFragment.newInstance(R.string.upload_list_empty_text_auto_upload, new String[]{}, R.string.filedetails_sync_file, R.string.common_ok, R.string.common_cancel, -1);
149+
showDialog(dialog);
150+
}
151+
152+
@Test
153+
@ScreenshotTest
154+
public void testConfirmationDialogWithThreeAction() {
155+
ConfirmationDialogFragment dialog = ConfirmationDialogFragment.newInstance(R.string.upload_list_empty_text_auto_upload, new String[]{}, R.string.filedetails_sync_file, R.string.common_ok, R.string.common_cancel, R.string.common_confirm);
156+
showDialog(dialog);
157+
}
158+
159+
@Test
160+
@ScreenshotTest
161+
public void testConfirmationDialogWithThreeActionRTL() {
162+
enableRTL();
163+
164+
ConfirmationDialogFragment dialog = ConfirmationDialogFragment.newInstance(R.string.upload_list_empty_text_auto_upload, new String[] { }, -1, R.string.common_ok, R.string.common_cancel, R.string.common_confirm);
165+
showDialog(dialog);
166+
167+
resetLocale();
168+
}
169+
137170
@Test
138171
@ScreenshotTest
139172
public void testRemoveFileDialog() {

app/src/androidTest/java/com/owncloud/android/ui/dialog/SyncFileNotEnoughSpaceDialogFragmentTest.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@ public void showNotEnoughSpaceDialogForFolder() {
4545
FileDisplayActivity test = activityRule.launchActivity(null);
4646
OCFile ocFile = new OCFile("/Document/");
4747
ocFile.setFileLength(5000000);
48+
ocFile.setFolder();
4849

4950
SyncFileNotEnoughSpaceDialogFragment dialog = SyncFileNotEnoughSpaceDialogFragment.newInstance(ocFile, 1000);
5051
dialog.show(test.getListOfFilesFragment().getFragmentManager(), "1");

app/src/androidTest/java/com/owncloud/android/ui/fragment/FileDetailFragmentStaticServerIT.kt

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -73,14 +73,19 @@ class FileDetailFragmentStaticServerIT : AbstractIT() {
7373
@Test
7474
@ScreenshotTest
7575
fun showFileDetailDetailsFragment() {
76-
val sut = testActivityRule.launchActivity(null)
77-
sut.addFragment(ImageDetailFragment.newInstance(oCFile, user))
76+
val activity = testActivityRule.launchActivity(null)
77+
val sut = ImageDetailFragment.newInstance(oCFile, user)
78+
activity.addFragment(sut)
7879

79-
waitForIdleSync()
80-
shortSleep()
8180
shortSleep()
8281
shortSleep()
83-
screenshot(sut)
82+
waitForIdleSync()
83+
84+
activity.runOnUiThread {
85+
sut.hideMap()
86+
}
87+
88+
screenshot(activity)
8489
}
8590

8691
@Test
@@ -182,6 +187,7 @@ class FileDetailFragmentStaticServerIT : AbstractIT() {
182187
waitForIdleSync()
183188

184189
activity.runOnUiThread {
190+
sut.fileDetailActivitiesFragment.disableLoadingActivities()
185191
sut
186192
.fileDetailActivitiesFragment
187193
.setErrorContent(targetContext.resources.getString(R.string.file_detail_activity_error))

app/src/main/java/com/nextcloud/client/di/ActivityInjector.java

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

0 commit comments

Comments
 (0)