diff --git a/.github/workflows/analysis.yml b/.github/workflows/analysis.yml index a17f5632f9..bc9cdb1b3b 100644 --- a/.github/workflows/analysis.yml +++ b/.github/workflows/analysis.yml @@ -33,7 +33,7 @@ jobs: echo "pr=${{ github.event.pull_request.number }}" >> "$GITHUB_OUTPUT" echo "repo=${{ github.event.pull_request.head.repo.full_name }}" >> "$GITHUB_OUTPUT" fi - - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 + - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 with: repository: ${{ steps.get-vars.outputs.repo }} ref: ${{ steps.get-vars.outputs.branch }} diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml index 3ea950d1c1..d0ef920344 100644 --- a/.github/workflows/codeql.yml +++ b/.github/workflows/codeql.yml @@ -26,7 +26,7 @@ jobs: language: [ 'java' ] steps: - name: Checkout repository - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 + uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 - name: Set Swap Space uses: pierotofy/set-swap-space@49819abfb41bd9b44fb781159c033dba90353a7c # v1.0 with: diff --git a/.github/workflows/gradle-wrapper-validation.yml b/.github/workflows/gradle-wrapper-validation.yml index 45a120cb4e..1ecd60deb2 100644 --- a/.github/workflows/gradle-wrapper-validation.yml +++ b/.github/workflows/gradle-wrapper-validation.yml @@ -18,5 +18,5 @@ jobs: name: "Validation" runs-on: ubuntu-latest steps: - - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 + - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 - uses: gradle/wrapper-validation-action@56b90f209b02bf6d1deae490e9ef18b21a389cd4 # v1.1.0 diff --git a/.github/workflows/scorecard.yml b/.github/workflows/scorecard.yml index f54c98fedb..04e89bad60 100644 --- a/.github/workflows/scorecard.yml +++ b/.github/workflows/scorecard.yml @@ -24,7 +24,7 @@ jobs: steps: - name: "Checkout code" - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 + uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 with: persist-credentials: false diff --git a/README.md b/README.md index 5bf764cecd..cdf43994ab 100644 --- a/README.md +++ b/README.md @@ -15,11 +15,17 @@ height="80">](https://f-droid.org/packages/com.nextcloud.client/) ## How to contribute :rocket: -If you want to [contribute](https://nextcloud.com/contribute/) to Nextcloud, you are very welcome: +If you want to [contribute](https://nextcloud.com/contribute/) to the Nextcloud Android client app, there are many ways to help whether or not you are a coder: -* our forum at https://help.nextcloud.com -* for translations of the app on [Transifex](https://app.transifex.com/nextcloud/nextcloud/android/) -* opening issues and PRs (including a corresponding issue) +* helping out other users on our forum at https://help.nextcloud.com +* providing translations of the app on [Transifex](https://app.transifex.com/nextcloud/nextcloud/android/) +* reporting problems / suggesting enhancements by [opening new issues](https://github.com/nextcloud/android/issues/new/choose) +* implementing proposed bug fixes and enhancement ideas by submitting PRs (associated with a corresponding issue preferably) +* reviewing [pull requests](https://github.com/nextcloud/android/pulls) and providing feedback on code, implementation, and functionality +* installing and testing [pull request builds](https://github.com/nextcloud/android/pulls), [daily/dev builds](https://github.com/nextcloud/android#development-version-hammer), or [RCs/release candidate builds](https://github.com/nextcloud/android/releases) +* enhancing Admin, User, or Developer [documentation](https://github.com/nextcloud/documentation/) +* hitting hard on the latest stable release by testing fundamental features and evaluating the user experience +* proactively getting familiar with [how to gather debug logs](https://github.com/nextcloud/android#getting-debug-info-via-logcat-mag) from your devices (so that you are prepared to provide a detailed report if you encounter a problem with the app in the future) ## Contribution Guidelines & License :scroll: @@ -38,7 +44,7 @@ More information on how to contribute: ## Start contributing :hammer\_and\_wrench: Make sure you read [SETUP.md](https://github.com/nextcloud/android/blob/master/SETUP.md) and [CONTRIBUTING.md](https://github.com/nextcloud/android/blob/master/CONTRIBUTING.md) before you start working on this project. But basically: fork this repository and contribute back using pull requests to the master branch. -Easy starting points are also reviewing [pull requests](https://github.com/nextcloud/android/pulls) and working on [starter issues](https://github.com/nextcloud/android/issues?q=is%3Aopen+is%3Aissue+label%3A%22starter+issue%22). +Easy starting points are also reviewing [pull requests](https://github.com/nextcloud/android/pulls) and working on [starter issues](https://github.com/nextcloud/android/issues?q=is%3Aopen+is%3Aissue+label%3A%22good+first+issue%22). ### Getting debug info via logcat :mag: diff --git a/app/screenshots/gplay/debug/com.owncloud.android.ui.dialog.DialogFragmentIT_testNewFolderDialog.png b/app/screenshots/gplay/debug/com.owncloud.android.ui.dialog.DialogFragmentIT_testNewFolderDialog.png index 658eafbc80..d4dfd20689 100644 Binary files a/app/screenshots/gplay/debug/com.owncloud.android.ui.dialog.DialogFragmentIT_testNewFolderDialog.png and b/app/screenshots/gplay/debug/com.owncloud.android.ui.dialog.DialogFragmentIT_testNewFolderDialog.png differ diff --git a/app/screenshots/gplay/debug/com.owncloud.android.ui.dialog.DialogFragmentIT_testRemoveFileDialog.png b/app/screenshots/gplay/debug/com.owncloud.android.ui.dialog.DialogFragmentIT_testRemoveFileDialog.png index c4bd33b4ab..e451319a42 100644 Binary files a/app/screenshots/gplay/debug/com.owncloud.android.ui.dialog.DialogFragmentIT_testRemoveFileDialog.png and b/app/screenshots/gplay/debug/com.owncloud.android.ui.dialog.DialogFragmentIT_testRemoveFileDialog.png differ diff --git a/app/screenshots/gplay/debug/com.owncloud.android.ui.dialog.DialogFragmentIT_testRemoveFilesDialog.png b/app/screenshots/gplay/debug/com.owncloud.android.ui.dialog.DialogFragmentIT_testRemoveFilesDialog.png index 6681374612..caa860dc2b 100644 Binary files a/app/screenshots/gplay/debug/com.owncloud.android.ui.dialog.DialogFragmentIT_testRemoveFilesDialog.png and b/app/screenshots/gplay/debug/com.owncloud.android.ui.dialog.DialogFragmentIT_testRemoveFilesDialog.png differ diff --git a/app/screenshots/gplay/debug/com.owncloud.android.ui.dialog.DialogFragmentIT_testRemoveFolderDialog.png b/app/screenshots/gplay/debug/com.owncloud.android.ui.dialog.DialogFragmentIT_testRemoveFolderDialog.png index 1ef759d4f6..ff26465967 100644 Binary files a/app/screenshots/gplay/debug/com.owncloud.android.ui.dialog.DialogFragmentIT_testRemoveFolderDialog.png and b/app/screenshots/gplay/debug/com.owncloud.android.ui.dialog.DialogFragmentIT_testRemoveFolderDialog.png differ diff --git a/app/screenshots/gplay/debug/com.owncloud.android.ui.dialog.DialogFragmentIT_testRemoveFoldersDialog.png b/app/screenshots/gplay/debug/com.owncloud.android.ui.dialog.DialogFragmentIT_testRemoveFoldersDialog.png index 6681374612..caa860dc2b 100644 Binary files a/app/screenshots/gplay/debug/com.owncloud.android.ui.dialog.DialogFragmentIT_testRemoveFoldersDialog.png and b/app/screenshots/gplay/debug/com.owncloud.android.ui.dialog.DialogFragmentIT_testRemoveFoldersDialog.png differ diff --git a/app/screenshots/gplay/debug/com.owncloud.android.ui.dialog.DialogFragmentIT_testStoragePermissionDialog.png b/app/screenshots/gplay/debug/com.owncloud.android.ui.dialog.DialogFragmentIT_testStoragePermissionDialog.png index 065c11e163..7aae975060 100644 Binary files a/app/screenshots/gplay/debug/com.owncloud.android.ui.dialog.DialogFragmentIT_testStoragePermissionDialog.png and b/app/screenshots/gplay/debug/com.owncloud.android.ui.dialog.DialogFragmentIT_testStoragePermissionDialog.png differ diff --git a/app/screenshots/gplay/debug/com.owncloud.android.ui.fragment.FileDetailFragmentStaticServerIT_showFileDetailActivitiesFragment.png b/app/screenshots/gplay/debug/com.owncloud.android.ui.fragment.FileDetailFragmentStaticServerIT_showFileDetailActivitiesFragment.png index 01ad7143ff..32a31a678a 100644 Binary files a/app/screenshots/gplay/debug/com.owncloud.android.ui.fragment.FileDetailFragmentStaticServerIT_showFileDetailActivitiesFragment.png and b/app/screenshots/gplay/debug/com.owncloud.android.ui.fragment.FileDetailFragmentStaticServerIT_showFileDetailActivitiesFragment.png differ diff --git a/app/screenshots/gplay/debug/com.owncloud.android.ui.fragment.FileDetailFragmentStaticServerIT_showFileDetailDetailsFragment.png b/app/screenshots/gplay/debug/com.owncloud.android.ui.fragment.FileDetailFragmentStaticServerIT_showFileDetailDetailsFragment.png index 83710dda13..e853f17b91 100644 Binary files a/app/screenshots/gplay/debug/com.owncloud.android.ui.fragment.FileDetailFragmentStaticServerIT_showFileDetailDetailsFragment.png and b/app/screenshots/gplay/debug/com.owncloud.android.ui.fragment.FileDetailFragmentStaticServerIT_showFileDetailDetailsFragment.png differ diff --git a/app/src/androidTest/java/com/owncloud/android/ui/fragment/FileDetailFragmentStaticServerIT.kt b/app/src/androidTest/java/com/owncloud/android/ui/fragment/FileDetailFragmentStaticServerIT.kt index 5f6883e1ab..71213ff592 100644 --- a/app/src/androidTest/java/com/owncloud/android/ui/fragment/FileDetailFragmentStaticServerIT.kt +++ b/app/src/androidTest/java/com/owncloud/android/ui/fragment/FileDetailFragmentStaticServerIT.kt @@ -73,14 +73,19 @@ class FileDetailFragmentStaticServerIT : AbstractIT() { @Test @ScreenshotTest fun showFileDetailDetailsFragment() { - val sut = testActivityRule.launchActivity(null) - sut.addFragment(ImageDetailFragment.newInstance(oCFile, user)) + val activity = testActivityRule.launchActivity(null) + val sut = ImageDetailFragment.newInstance(oCFile, user) + activity.addFragment(sut) + shortSleep() + shortSleep() waitForIdleSync() - shortSleep() - shortSleep() - shortSleep() - screenshot(sut) + + activity.runOnUiThread { + sut.hideMap() + } + + screenshot(activity) } @Test @@ -182,6 +187,7 @@ class FileDetailFragmentStaticServerIT : AbstractIT() { waitForIdleSync() activity.runOnUiThread { + sut.fileDetailActivitiesFragment.disableLoadingActivities() sut .fileDetailActivitiesFragment .setErrorContent(targetContext.resources.getString(R.string.file_detail_activity_error)) diff --git a/app/src/main/java/com/nextcloud/client/di/ComponentsModule.java b/app/src/main/java/com/nextcloud/client/di/ComponentsModule.java index d776c042a9..5039fb4274 100644 --- a/app/src/main/java/com/nextcloud/client/di/ComponentsModule.java +++ b/app/src/main/java/com/nextcloud/client/di/ComponentsModule.java @@ -92,7 +92,6 @@ import com.owncloud.android.ui.dialog.IndeterminateProgressDialog; import com.owncloud.android.ui.dialog.LoadingDialog; import com.owncloud.android.ui.dialog.LocalStoragePathPickerDialogFragment; import com.owncloud.android.ui.dialog.MultipleAccountsDialog; -import com.owncloud.android.ui.dialog.NoteDialogFragment; import com.owncloud.android.ui.dialog.RemoveFilesDialogFragment; import com.owncloud.android.ui.dialog.RenameFileDialogFragment; import com.owncloud.android.ui.dialog.RenamePublicShareDialogFragment; @@ -404,9 +403,6 @@ abstract class ComponentsModule { @ContributesAndroidInjector abstract Migrations migrations(); - @ContributesAndroidInjector - abstract NoteDialogFragment noteDialogFragment(); - @ContributesAndroidInjector abstract NotificationWork notificationWork(); diff --git a/app/src/main/java/com/nextcloud/ui/ImageDetailFragment.kt b/app/src/main/java/com/nextcloud/ui/ImageDetailFragment.kt index e858c6fa97..590e9e464f 100644 --- a/app/src/main/java/com/nextcloud/ui/ImageDetailFragment.kt +++ b/app/src/main/java/com/nextcloud/ui/ImageDetailFragment.kt @@ -30,6 +30,7 @@ import android.os.Parcelable import android.view.LayoutInflater import android.view.View import android.view.ViewGroup +import androidx.annotation.VisibleForTesting import androidx.core.content.ContextCompat import androidx.fragment.app.Fragment import com.nextcloud.android.common.ui.theme.utils.ColorRole @@ -260,6 +261,11 @@ class ImageDetailFragment : Fragment(), Injectable { binding.imageLocationMapCopyright.text = binding.imageLocationMap.tileProvider.tileSource.copyrightNotice } + @VisibleForTesting + fun hideMap() { + binding.imageLocationMap.visibility = View.GONE + } + @SuppressLint("SimpleDateFormat") private fun gatherMetadata() { val fileSize = DisplayUtils.bytesToHumanReadable(file.fileLength) diff --git a/app/src/main/java/com/owncloud/android/ui/dialog/AccountRemovalConfirmationDialog.java b/app/src/main/java/com/owncloud/android/ui/dialog/AccountRemovalConfirmationDialog.java index f2863b1975..a3a7e13912 100644 --- a/app/src/main/java/com/owncloud/android/ui/dialog/AccountRemovalConfirmationDialog.java +++ b/app/src/main/java/com/owncloud/android/ui/dialog/AccountRemovalConfirmationDialog.java @@ -25,6 +25,7 @@ package com.owncloud.android.ui.dialog; import android.app.Dialog; import android.os.Bundle; +import com.google.android.material.button.MaterialButton; import com.google.android.material.dialog.MaterialAlertDialogBuilder; import com.nextcloud.client.account.User; import com.nextcloud.client.di.Injectable; @@ -59,7 +60,11 @@ public class AccountRemovalConfirmationDialog extends DialogFragment implements @Override public void onCreate(@Nullable Bundle savedInstanceState) { super.onCreate(savedInstanceState); - user = getArguments().getParcelable(KEY_USER); + + Bundle arguments = getArguments(); + if (arguments != null) { + user = arguments.getParcelable(KEY_USER); + } } @Override @@ -67,9 +72,18 @@ public class AccountRemovalConfirmationDialog extends DialogFragment implements super.onStart(); AlertDialog alertDialog = (AlertDialog) getDialog(); + if (alertDialog != null) { - viewThemeUtils.platform.colorTextButtons(alertDialog.getButton(AlertDialog.BUTTON_POSITIVE), - alertDialog.getButton(AlertDialog.BUTTON_NEUTRAL)); + MaterialButton positiveButton = (MaterialButton) alertDialog.getButton(AlertDialog.BUTTON_POSITIVE); + if (positiveButton != null) { + viewThemeUtils.material.colorMaterialButtonPrimaryTonal(positiveButton); + } + + MaterialButton negativeButton = (MaterialButton) alertDialog.getButton(AlertDialog.BUTTON_NEGATIVE); + if (negativeButton != null) { + viewThemeUtils.material.colorMaterialButtonPrimaryBorderless(negativeButton); + } + } } @NonNull @@ -82,7 +96,7 @@ public class AccountRemovalConfirmationDialog extends DialogFragment implements .setPositiveButton(R.string.common_ok, (dialogInterface, i) -> backgroundJobManager.startAccountRemovalJob(user.getAccountName(), false)) - .setNeutralButton(R.string.common_cancel, null); + .setNegativeButton(R.string.common_cancel, null); viewThemeUtils.dialog.colorMaterialAlertDialogBackground(requireActivity(), builder); diff --git a/app/src/main/java/com/owncloud/android/ui/dialog/ChooseRichDocumentsTemplateDialogFragment.java b/app/src/main/java/com/owncloud/android/ui/dialog/ChooseRichDocumentsTemplateDialogFragment.java index b95a357e0f..b62576fd82 100644 --- a/app/src/main/java/com/owncloud/android/ui/dialog/ChooseRichDocumentsTemplateDialogFragment.java +++ b/app/src/main/java/com/owncloud/android/ui/dialog/ChooseRichDocumentsTemplateDialogFragment.java @@ -35,6 +35,7 @@ import android.view.LayoutInflater; import android.view.View; import android.widget.Button; +import com.google.android.material.button.MaterialButton; import com.google.android.material.dialog.MaterialAlertDialogBuilder; import com.google.common.collect.Sets; import com.nextcloud.client.account.CurrentAccountProvider; @@ -99,7 +100,7 @@ public class ChooseRichDocumentsTemplateDialogFragment extends DialogFragment im private RichDocumentsTemplateAdapter adapter; private OCFile parentFolder; private OwnCloudClient client; - private Button positiveButton; + private MaterialButton positiveButton; private DialogFragment waitDialog; public enum Type { @@ -126,11 +127,18 @@ public class ChooseRichDocumentsTemplateDialogFragment extends DialogFragment im AlertDialog alertDialog = (AlertDialog) getDialog(); - positiveButton = alertDialog.getButton(AlertDialog.BUTTON_POSITIVE); - viewThemeUtils.platform.colorTextButtons(positiveButton, - alertDialog.getButton(AlertDialog.BUTTON_NEUTRAL)); - positiveButton.setOnClickListener(this); - positiveButton.setEnabled(false); + if (alertDialog != null) { + positiveButton = (MaterialButton) alertDialog.getButton(AlertDialog.BUTTON_POSITIVE); + viewThemeUtils.material.colorMaterialButtonPrimaryTonal(positiveButton); + + MaterialButton negativeButton = (MaterialButton) alertDialog.getButton(AlertDialog.BUTTON_NEGATIVE); + if (negativeButton != null) { + viewThemeUtils.material.colorMaterialButtonPrimaryBorderless(negativeButton); + } + + positiveButton.setOnClickListener(this); + positiveButton.setEnabled(false); + } checkEnablingCreateButton(); } @@ -205,12 +213,14 @@ public class ChooseRichDocumentsTemplateDialogFragment extends DialogFragment im } }); + int titleTextId = getTitle(type); + // Build the dialog MaterialAlertDialogBuilder builder = new MaterialAlertDialogBuilder(activity); builder.setView(view) .setPositiveButton(R.string.create, null) - .setNeutralButton(R.string.common_cancel, null) - .setTitle(getTitle(type)); + .setNegativeButton(R.string.common_cancel, null) + .setTitle(titleTextId); viewThemeUtils.dialog.colorMaterialAlertDialogBackground(activity, builder); diff --git a/app/src/main/java/com/owncloud/android/ui/dialog/CreateFolderDialogFragment.java b/app/src/main/java/com/owncloud/android/ui/dialog/CreateFolderDialogFragment.java index 3703822aab..c9a6d03376 100644 --- a/app/src/main/java/com/owncloud/android/ui/dialog/CreateFolderDialogFragment.java +++ b/app/src/main/java/com/owncloud/android/ui/dialog/CreateFolderDialogFragment.java @@ -31,6 +31,7 @@ import android.view.View; import android.widget.Button; import android.widget.TextView; +import com.google.android.material.button.MaterialButton; import com.google.android.material.dialog.MaterialAlertDialogBuilder; import com.google.common.collect.Sets; import com.nextcloud.client.di.Injectable; @@ -71,7 +72,7 @@ public class CreateFolderDialogFragment private OCFile mParentFolder; - private Button positiveButton; + private MaterialButton positiveButton; private EditBoxDialogBinding binding; @@ -101,13 +102,11 @@ public class CreateFolderDialogFragment private void bindButton() { Dialog dialog = getDialog(); - if (dialog instanceof AlertDialog) { - AlertDialog alertDialog = (AlertDialog) dialog; - - positiveButton = alertDialog.getButton(AlertDialog.BUTTON_POSITIVE); - - viewThemeUtils.platform.colorTextButtons(positiveButton, - alertDialog.getButton(AlertDialog.BUTTON_NEUTRAL)); + if (dialog instanceof AlertDialog alertDialog) { + positiveButton = (MaterialButton) alertDialog.getButton(AlertDialog.BUTTON_POSITIVE); + MaterialButton negativeButton = (MaterialButton) alertDialog.getButton(AlertDialog.BUTTON_NEGATIVE); + viewThemeUtils.material.colorMaterialButtonPrimaryTonal(positiveButton); + viewThemeUtils.material.colorMaterialButtonPrimaryBorderless(negativeButton); } } @@ -186,17 +185,25 @@ public class CreateFolderDialogFragment }); // Build the dialog - MaterialAlertDialogBuilder builder = new MaterialAlertDialogBuilder(requireActivity()); - builder.setView(view) - .setPositiveButton(R.string.folder_confirm_create, this) - .setNeutralButton(R.string.common_cancel, this) - .setTitle(R.string.uploader_info_dirname); + MaterialAlertDialogBuilder builder = buildMaterialAlertDialog(view); viewThemeUtils.dialog.colorMaterialAlertDialogBackground(binding.userInputContainer.getContext(), builder); return builder.create(); } + private MaterialAlertDialogBuilder buildMaterialAlertDialog(View view) { + MaterialAlertDialogBuilder builder = new MaterialAlertDialogBuilder(requireActivity()); + + builder + .setView(view) + .setPositiveButton(R.string.folder_confirm_create, this) + .setNegativeButton(R.string.common_cancel, this) + .setTitle(R.string.uploader_info_dirname); + + return builder; + } + @Override public void onClick(DialogInterface dialog, int which) { if (which == AlertDialog.BUTTON_POSITIVE) { diff --git a/app/src/main/java/com/owncloud/android/ui/dialog/ExpirationDatePickerDialogFragment.java b/app/src/main/java/com/owncloud/android/ui/dialog/ExpirationDatePickerDialogFragment.java index f1c16c6b49..5d97c7c1c5 100644 --- a/app/src/main/java/com/owncloud/android/ui/dialog/ExpirationDatePickerDialogFragment.java +++ b/app/src/main/java/com/owncloud/android/ui/dialog/ExpirationDatePickerDialogFragment.java @@ -30,6 +30,7 @@ import android.os.Bundle; import android.text.format.DateUtils; import android.widget.DatePicker; +import com.google.android.material.button.MaterialButton; import com.nextcloud.client.di.Injectable; import com.owncloud.android.R; import com.owncloud.android.utils.theme.ViewThemeUtils; @@ -81,12 +82,24 @@ public class ExpirationDatePickerDialogFragment public void onStart() { super.onStart(); final Dialog currentDialog = getDialog(); + if (currentDialog != null) { final DatePickerDialog dialog = (DatePickerDialog) currentDialog; - viewThemeUtils.platform.colorTextButtons(dialog.getButton(DatePickerDialog.BUTTON_NEUTRAL), - dialog.getButton(DatePickerDialog.BUTTON_NEGATIVE), - dialog.getButton(DatePickerDialog.BUTTON_POSITIVE)); + MaterialButton positiveButton = (MaterialButton) dialog.getButton(DatePickerDialog.BUTTON_POSITIVE); + if (positiveButton != null) { + viewThemeUtils.material.colorMaterialButtonPrimaryTonal(positiveButton); + } + + MaterialButton negativeButton = (MaterialButton) dialog.getButton(DatePickerDialog.BUTTON_NEGATIVE); + if (negativeButton != null) { + viewThemeUtils.material.colorMaterialButtonPrimaryBorderless(negativeButton); + } + + MaterialButton neutralButton = (MaterialButton) dialog.getButton(DatePickerDialog.BUTTON_NEUTRAL); + if (neutralButton != null) { + viewThemeUtils.material.colorMaterialButtonPrimaryBorderless(neutralButton); + } } } @@ -118,7 +131,7 @@ public class ExpirationDatePickerDialogFragment //show unset button only when date is already selected if (chosenDateInMillis > 0) { dialog.setButton( - Dialog.BUTTON_NEUTRAL, + Dialog.BUTTON_NEGATIVE, getText(R.string.share_via_link_unset_password), (dialog1, which) -> { if (onExpiryDateListener != null) { diff --git a/app/src/main/java/com/owncloud/android/ui/dialog/NoteDialogFragment.java b/app/src/main/java/com/owncloud/android/ui/dialog/NoteDialogFragment.java deleted file mode 100644 index 86ce2d6471..0000000000 --- a/app/src/main/java/com/owncloud/android/ui/dialog/NoteDialogFragment.java +++ /dev/null @@ -1,144 +0,0 @@ -/* - * Nextcloud Android client application - * - * @author Tobias Kaminsky - * Copyright (C) 2018 Tobias Kaminsky - * Copyright (C) 2018 Nextcloud GmbH. - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ - -package com.owncloud.android.ui.dialog; - -import android.app.Dialog; -import android.content.DialogInterface; -import android.os.Bundle; -import android.view.LayoutInflater; -import android.view.View; - -import com.google.android.material.dialog.MaterialAlertDialogBuilder; -import com.nextcloud.client.di.Injectable; -import com.owncloud.android.R; -import com.owncloud.android.databinding.NoteDialogBinding; -import com.owncloud.android.lib.resources.shares.OCShare; -import com.owncloud.android.ui.activity.ComponentsGetter; -import com.owncloud.android.utils.DisplayUtils; -import com.owncloud.android.utils.KeyboardUtils; -import com.owncloud.android.utils.theme.ViewThemeUtils; - -import javax.inject.Inject; - -import androidx.annotation.NonNull; -import androidx.annotation.Nullable; -import androidx.appcompat.app.AlertDialog; -import androidx.fragment.app.DialogFragment; - -/** - * Dialog to input a multiline note for a share - */ -public class NoteDialogFragment extends DialogFragment implements DialogInterface.OnClickListener, Injectable { - - private static final String ARG_SHARE = "SHARE"; - - @Inject ViewThemeUtils viewThemeUtils; - @Inject KeyboardUtils keyboardUtils; - - private OCShare share; - private NoteDialogBinding binding; - - public static NoteDialogFragment newInstance(OCShare share) { - NoteDialogFragment frag = new NoteDialogFragment(); - - Bundle args = new Bundle(); - args.putParcelable(ARG_SHARE, share); - frag.setArguments(args); - - return frag; - } - - @Override - public void onCreate(@Nullable Bundle savedInstanceState) { - super.onCreate(savedInstanceState); - - if (getArguments() == null) { - throw new IllegalArgumentException("Arguments may not be null"); - } - share = getArguments().getParcelable(ARG_SHARE); - } - - @Override - public void onStart() { - super.onStart(); - - AlertDialog alertDialog = (AlertDialog) getDialog(); - - viewThemeUtils.platform.colorTextButtons(alertDialog.getButton(AlertDialog.BUTTON_POSITIVE), - alertDialog.getButton(AlertDialog.BUTTON_NEUTRAL)); - } - - @Override - public void onResume() { - super.onResume(); - keyboardUtils.showKeyboardForEditText(requireDialog().getWindow(), binding.noteText); - } - - @NonNull - @Override - public Dialog onCreateDialog(Bundle savedInstanceState) { - // Inflate the layout for the dialog - LayoutInflater inflater = requireActivity().getLayoutInflater(); - binding = NoteDialogBinding.inflate(inflater, null, false); - View view = binding.getRoot(); - - // Setup layout - binding.noteText.setText(share.getNote()); - viewThemeUtils.material.colorTextInputLayout(binding.noteContainer); - - // Build the dialog - MaterialAlertDialogBuilder builder = new MaterialAlertDialogBuilder(binding.noteContainer.getContext()); - builder.setView(view) - .setPositiveButton(R.string.note_confirm, this) - .setNeutralButton(R.string.common_cancel, this) - .setTitle(R.string.send_note); - - viewThemeUtils.dialog.colorMaterialAlertDialogBackground(binding.noteContainer.getContext(), builder); - - return builder.create(); - } - - @Override - public void onClick(DialogInterface dialog, int which) { - if (which == AlertDialog.BUTTON_POSITIVE) { - ComponentsGetter componentsGetter = (ComponentsGetter) getActivity(); - - if (componentsGetter != null) { - String note = ""; - - if (binding.noteText.getText() != null) { - note = binding.noteText.getText().toString().trim(); - } - - componentsGetter.getFileOperationsHelper().updateNoteToShare(share, note); - } else { - DisplayUtils.showSnackMessage(requireActivity(), R.string.note_could_not_sent); - } - } - } - - @Override - public void onDestroyView() { - super.onDestroyView(); - binding = null; - } -} diff --git a/app/src/main/java/com/owncloud/android/ui/dialog/RemoveFilesDialogFragment.java b/app/src/main/java/com/owncloud/android/ui/dialog/RemoveFilesDialogFragment.java index 64b832b34d..087ff25035 100644 --- a/app/src/main/java/com/owncloud/android/ui/dialog/RemoveFilesDialogFragment.java +++ b/app/src/main/java/com/owncloud/android/ui/dialog/RemoveFilesDialogFragment.java @@ -23,6 +23,7 @@ import android.app.Dialog; import android.os.Bundle; import android.view.ActionMode; +import com.google.android.material.button.MaterialButton; import com.nextcloud.client.di.Injectable; import com.owncloud.android.R; import com.owncloud.android.datamodel.OCFile; @@ -96,15 +97,20 @@ public class RemoveFilesDialogFragment extends ConfirmationDialogFragment implem R.string.confirmation_remove_files_alert; } - int localRemoveButton = (containsFolder || containsDown) ? R.string.confirmation_remove_local : -1; - args.putInt(ARG_MESSAGE_RESOURCE_ID, messageStringId); if (files.size() == SINGLE_SELECTION) { - args.putStringArray(ARG_MESSAGE_ARGUMENTS, new String[]{files.get(0).getFileName()}); + args.putStringArray(ARG_MESSAGE_ARGUMENTS, new String[] { files.get(0).getFileName() } ); } + args.putInt(ARG_POSITIVE_BTN_RES, R.string.file_delete); - args.putInt(ARG_NEUTRAL_BTN_RES, R.string.file_keep); - args.putInt(ARG_NEGATIVE_BTN_RES, localRemoveButton); + + if (containsFolder || containsDown) { + args.putInt(ARG_NEGATIVE_BTN_RES, R.string.confirmation_remove_local); + args.putInt(ARG_NEUTRAL_BTN_RES, R.string.file_keep); + } else { + args.putInt(ARG_NEGATIVE_BTN_RES, R.string.file_keep); + } + args.putParcelableArrayList(ARG_TARGET_FILES, files); frag.setArguments(args); @@ -131,9 +137,16 @@ public class RemoveFilesDialogFragment extends ConfirmationDialogFragment implem AlertDialog alertDialog = (AlertDialog) getDialog(); if (alertDialog != null) { - viewThemeUtils.platform.colorTextButtons(alertDialog.getButton(AlertDialog.BUTTON_POSITIVE), - alertDialog.getButton(AlertDialog.BUTTON_NEGATIVE), - alertDialog.getButton(AlertDialog.BUTTON_NEUTRAL)); + MaterialButton positiveButton = (MaterialButton) alertDialog.getButton(AlertDialog.BUTTON_POSITIVE); + viewThemeUtils.material.colorMaterialButtonPrimaryTonal(positiveButton); + + MaterialButton negativeButton = (MaterialButton) alertDialog.getButton(AlertDialog.BUTTON_NEGATIVE); + viewThemeUtils.material.colorMaterialButtonPrimaryBorderless(negativeButton); + + MaterialButton neutralButton = (MaterialButton) alertDialog.getButton(AlertDialog.BUTTON_NEUTRAL); + if (neutralButton != null) { + viewThemeUtils.material.colorMaterialButtonPrimaryBorderless(neutralButton); + } } } @@ -141,10 +154,14 @@ public class RemoveFilesDialogFragment extends ConfirmationDialogFragment implem @Override public Dialog onCreateDialog(Bundle savedInstanceState) { Dialog dialog = super.onCreateDialog(savedInstanceState); - mTargetFiles = getArguments().getParcelableArrayList(ARG_TARGET_FILES); + Bundle arguments = getArguments(); + if (arguments == null) { + return dialog; + } + + mTargetFiles = arguments.getParcelableArrayList(ARG_TARGET_FILES); setOnConfirmationListener(this); - return dialog; } @@ -154,9 +171,7 @@ public class RemoveFilesDialogFragment extends ConfirmationDialogFragment implem */ @Override public void onConfirmation(String callerTag) { - ComponentsGetter cg = (ComponentsGetter) getActivity(); - cg.getFileOperationsHelper().removeFiles(mTargetFiles, false, false); - finishActionMode(); + removeFiles(false); } /** @@ -164,8 +179,14 @@ public class RemoveFilesDialogFragment extends ConfirmationDialogFragment implem */ @Override public void onCancel(String callerTag) { + removeFiles(true); + } + + private void removeFiles(boolean onlyLocalCopy) { ComponentsGetter cg = (ComponentsGetter) getActivity(); - cg.getFileOperationsHelper().removeFiles(mTargetFiles, true, false); + if (cg != null) { + cg.getFileOperationsHelper().removeFiles(mTargetFiles, onlyLocalCopy, false); + } finishActionMode(); } diff --git a/app/src/main/java/com/owncloud/android/ui/dialog/RenamePublicShareDialogFragment.java b/app/src/main/java/com/owncloud/android/ui/dialog/RenamePublicShareDialogFragment.java index e043a8975a..7973b93faf 100644 --- a/app/src/main/java/com/owncloud/android/ui/dialog/RenamePublicShareDialogFragment.java +++ b/app/src/main/java/com/owncloud/android/ui/dialog/RenamePublicShareDialogFragment.java @@ -28,6 +28,7 @@ import android.text.TextUtils; import android.view.LayoutInflater; import android.view.View; +import com.google.android.material.button.MaterialButton; import com.google.android.material.dialog.MaterialAlertDialogBuilder; import com.nextcloud.client.di.Injectable; import com.owncloud.android.R; @@ -52,8 +53,6 @@ public class RenamePublicShareDialogFragment private static final String ARG_PUBLIC_SHARE = "PUBLIC_SHARE"; - public static final String RENAME_PUBLIC_SHARE_FRAGMENT = "RENAME_PUBLIC_SHARE_FRAGMENT"; - @Inject ViewThemeUtils viewThemeUtils; @Inject KeyboardUtils keyboardUtils; @@ -75,8 +74,10 @@ public class RenamePublicShareDialogFragment AlertDialog alertDialog = (AlertDialog) getDialog(); if (alertDialog != null) { - viewThemeUtils.platform.colorTextButtons(alertDialog.getButton(AlertDialog.BUTTON_POSITIVE), - alertDialog.getButton(AlertDialog.BUTTON_NEUTRAL)); + MaterialButton positiveButton = (MaterialButton) alertDialog.getButton(AlertDialog.BUTTON_POSITIVE); + MaterialButton negativeButton = (MaterialButton) alertDialog.getButton(AlertDialog.BUTTON_NEGATIVE); + viewThemeUtils.material.colorMaterialButtonPrimaryTonal(positiveButton); + viewThemeUtils.material.colorMaterialButtonPrimaryBorderless(negativeButton); } } @@ -104,7 +105,7 @@ public class RenamePublicShareDialogFragment MaterialAlertDialogBuilder builder = new MaterialAlertDialogBuilder(view.getContext()); builder.setView(view) .setPositiveButton(R.string.file_rename, this) - .setNeutralButton(R.string.common_cancel, this) + .setNegativeButton(R.string.common_cancel, this) .setTitle(R.string.public_share_name); viewThemeUtils.dialog.colorMaterialAlertDialogBackground(binding.userInput.getContext(), builder); diff --git a/app/src/main/java/com/owncloud/android/ui/dialog/SslValidatorDialog.java b/app/src/main/java/com/owncloud/android/ui/dialog/SslValidatorDialog.java deleted file mode 100644 index 2373681946..0000000000 --- a/app/src/main/java/com/owncloud/android/ui/dialog/SslValidatorDialog.java +++ /dev/null @@ -1,329 +0,0 @@ -/** - * ownCloud Android client application - * - * @author David A. Velasco - * Copyright (C) 2015 ownCloud Inc. - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2, - * as published by the Free Software Foundation. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - * - */ - -package com.owncloud.android.ui.dialog; - -import android.app.Dialog; -import android.content.Context; -import android.os.Bundle; -import android.view.View; -import android.view.Window; -import android.widget.Button; - -import com.owncloud.android.R; -import com.owncloud.android.databinding.SslValidatorLayoutBinding; -import com.owncloud.android.lib.common.network.CertificateCombinedException; -import com.owncloud.android.lib.common.network.NetworkUtils; -import com.owncloud.android.lib.common.operations.RemoteOperationResult; -import com.owncloud.android.lib.common.utils.Log_OC; - -import java.io.IOException; -import java.security.GeneralSecurityException; -import java.security.KeyStoreException; -import java.security.NoSuchAlgorithmException; -import java.security.cert.CertificateException; -import java.security.cert.X509Certificate; -import java.util.Date; -import java.util.HashMap; -import java.util.Map; - -import javax.security.auth.x500.X500Principal; - -/** - * Dialog to request the user about a certificate that could not be validated with the certificates store in the system. - */ -public class SslValidatorDialog extends Dialog { - - private final static String TAG = SslValidatorDialog.class.getSimpleName(); - - private OnSslValidatorListener mListener; - private CertificateCombinedException mException; - private SslValidatorLayoutBinding binding; - - - /** - * Creates a new SslValidatorDialog to ask the user if an untrusted certificate from a server should - * be trusted. - * - * @param context Android context where the dialog will live. - * @param result Result of a failed remote operation. - * @param listener Object to notice when the server certificate was added to the local certificates store. - * @return A new SslValidatorDialog instance. NULL if the operation can not be recovered - * by setting the certificate as reliable. - */ - public static SslValidatorDialog newInstance(Context context, RemoteOperationResult result, OnSslValidatorListener listener) { - if (result != null && result.isSslRecoverableException()) { - return new SslValidatorDialog(context, listener); - } else { - return null; - } - } - - /** - * Private constructor. - * - * Instances have to be created through static {@link SslValidatorDialog#newInstance}. - * - * @param context Android context where the dialog will live - * @param listener Object to notice when the server certificate was added to the local certificates store. - */ - private SslValidatorDialog(Context context, OnSslValidatorListener listener) { - super(context); - mListener = listener; - } - - /** - * {@inheritDoc} - */ - protected void onCreate(Bundle savedInstanceState) { - super.onCreate(savedInstanceState); - requestWindowFeature(Window.FEATURE_NO_TITLE); - binding = SslValidatorLayoutBinding.inflate(getLayoutInflater()); - setContentView(binding.getRoot()); - - binding.ok.setOnClickListener( - new View.OnClickListener() { - @Override - public void onClick(View v) { - try { - saveServerCert(); - dismiss(); - if (mListener != null) { - mListener.onSavedCertificate(); - } else { - Log_OC.d(TAG, "Nobody there to notify the certificate was saved"); - } - - } catch (GeneralSecurityException | IOException e) { - dismiss(); - if (mListener != null) { - mListener.onFailedSavingCertificate(); - } - Log_OC.e(TAG, "Server certificate could not be saved in the known servers trust store ", e); - - } - } - }); - - binding.cancel.setOnClickListener( - new View.OnClickListener() { - @Override - public void onClick(View v) { - cancel(); - } - }); - - binding.detailsBtn.setOnClickListener( - new View.OnClickListener() { - @Override - public void onClick(View v) { - View detailsScroll = findViewById(R.id.details_scroll); - if (detailsScroll.getVisibility() == View.VISIBLE) { - detailsScroll.setVisibility(View.GONE); - ((Button) v).setText(R.string.ssl_validator_btn_details_see); - } else { - detailsScroll.setVisibility(View.VISIBLE); - ((Button) v).setText(R.string.ssl_validator_btn_details_hide); - } - } - }); - } - - - public void updateResult(RemoteOperationResult result) { - if (result.isSslRecoverableException()) { - mException = (CertificateCombinedException) result.getException(); - - /// clean - binding.reasonCertNotTrusted.setVisibility(View.GONE); - binding.reasonCertExpired.setVisibility(View.GONE); - binding.reasonCertNotYetValid.setVisibility(View.GONE); - binding.reasonHostnameNotVerified.setVisibility(View.GONE); - binding.detailsScroll.setVisibility(View.GONE); - - /// refresh - if (mException.getCertPathValidatorException() != null) { - binding.reasonCertNotTrusted.setVisibility(View.VISIBLE); - } - - if (mException.getCertificateExpiredException() != null) { - binding.reasonCertExpired.setVisibility(View.VISIBLE); - } - - if (mException.getCertificateNotYetValidException() != null) { - binding.reasonCertNotYetValid.setVisibility(View.VISIBLE); - } - - if (mException.getSslPeerUnverifiedException() != null ) { - binding.reasonHostnameNotVerified.setVisibility(View.VISIBLE); - } - - showCertificateData(mException.getServerCertificate()); - } - } - - private void showCertificateData(X509Certificate cert) { - - if (cert != null) { - showSubject(cert.getSubjectX500Principal()); - showIssuer(cert.getIssuerX500Principal()); - showValidity(cert.getNotBefore(), cert.getNotAfter()); - showSignature(cert); - - } else { - // this should not happen, TODO - Log_OC.d("certNull", "This should not happen"); - } - } - - private void showSignature(X509Certificate cert) { - binding.valueSignature.setText(getHex(cert.getSignature())); - binding.valueSignatureAlgorithm.setText(cert.getSigAlgName()); - } - - public String getHex(final byte [] raw) { - if (raw == null) { - return null; - } - final StringBuilder hex = new StringBuilder(2 * raw.length); - for (final byte b : raw) { - final int hiVal = (b & 0xF0) >> 4; - final int loVal = b & 0x0F; - hex.append((char) ('0' + (hiVal + (hiVal / 10 * 7)))); - hex.append((char) ('0' + (loVal + (loVal / 10 * 7)))); - } - return hex.toString(); - } - - @SuppressWarnings("deprecation") - private void showValidity(Date notBefore, Date notAfter) { - binding.valueValidityFrom.setText(notBefore.toLocaleString()); - binding.valueValidityTo.setText(notAfter.toLocaleString()); - } - - private void showSubject(X500Principal subject) { - Map s = parsePrincipal(subject); - - if (s.get("CN") != null) { - binding.valueSubjectCN.setText(s.get("CN")); - binding.valueSubjectCN.setVisibility(View.VISIBLE); - } else { - binding.valueSubjectCN.setVisibility(View.GONE); - } - if (s.get("O") != null) { - binding.valueSubjectO.setText(s.get("O")); - binding.valueSubjectO.setVisibility(View.VISIBLE); - } else { - binding.valueSubjectO.setVisibility(View.GONE); - } - if (s.get("OU") != null) { - binding.valueSubjectOU.setText(s.get("OU")); - binding.valueSubjectOU.setVisibility(View.VISIBLE); - } else { - binding.valueSubjectOU.setVisibility(View.GONE); - } - if (s.get("C") != null) { - binding.valueSubjectC.setText(s.get("C")); - binding.valueSubjectC.setVisibility(View.VISIBLE); - } else { - binding.valueSubjectC.setVisibility(View.GONE); - } - if (s.get("ST") != null) { - binding.valueSubjectST.setText(s.get("ST")); - binding.valueSubjectST.setVisibility(View.VISIBLE); - } else { - binding.valueSubjectST.setVisibility(View.GONE); - } - if (s.get("L") != null) { - binding.valueSubjectL.setText(s.get("L")); - binding.valueSubjectL.setVisibility(View.VISIBLE); - } else { - binding.valueSubjectL.setVisibility(View.GONE); - } - } - - private void showIssuer(X500Principal issuer) { - Map s = parsePrincipal(issuer); - - if (s.get("CN") != null) { - binding.valueIssuerCN.setText(s.get("CN")); - binding.valueIssuerCN.setVisibility(View.VISIBLE); - } else { - binding.valueIssuerCN.setVisibility(View.GONE); - } - if (s.get("O") != null) { - binding.valueIssuerO.setText(s.get("O")); - binding.valueIssuerO.setVisibility(View.VISIBLE); - } else { - binding.valueIssuerO.setVisibility(View.GONE); - } - if (s.get("OU") != null) { - binding.valueIssuerOU.setText(s.get("OU")); - binding.valueIssuerOU.setVisibility(View.VISIBLE); - } else { - binding.valueIssuerOU.setVisibility(View.GONE); - } - if (s.get("C") != null) { - binding.valueIssuerC.setText(s.get("C")); - binding.valueIssuerC.setVisibility(View.VISIBLE); - } else { - binding.valueIssuerC.setVisibility(View.GONE); - } - if (s.get("ST") != null) { - binding.valueIssuerST.setText(s.get("ST")); - binding.valueIssuerST.setVisibility(View.VISIBLE); - } else { - binding.valueIssuerST.setVisibility(View.GONE); - } - if (s.get("L") != null) { - binding.valueIssuerL.setText(s.get("L")); - binding.valueIssuerL.setVisibility(View.VISIBLE); - } else { - binding.valueIssuerL.setVisibility(View.GONE); - } - } - - private Map parsePrincipal(X500Principal principal) { - Map result = new HashMap<>(); - String toParse = principal.getName(); - String[] pieces = toParse.split(","); - String[] tokens = {"CN", "O", "OU", "C", "ST", "L"}; - for (String piece : pieces) { - for (String token : tokens) { - if (piece.startsWith(token + "=")) { - result.put(token, piece.substring(token.length() + 1)); - } - } - } - return result; - } - - private void saveServerCert() throws KeyStoreException, NoSuchAlgorithmException, CertificateException, IOException { - if (mException.getServerCertificate() != null) { - // TODO make this asynchronously, it can take some time - NetworkUtils.addCertToKnownServersStore(mException.getServerCertificate(), getContext()); - } - } - - public interface OnSslValidatorListener { - public void onSavedCertificate(); - public void onFailedSavingCertificate(); - } -} diff --git a/app/src/main/java/com/owncloud/android/ui/dialog/StoragePermissionDialogFragment.kt b/app/src/main/java/com/owncloud/android/ui/dialog/StoragePermissionDialogFragment.kt index c3cddfcc30..d2b179e666 100644 --- a/app/src/main/java/com/owncloud/android/ui/dialog/StoragePermissionDialogFragment.kt +++ b/app/src/main/java/com/owncloud/android/ui/dialog/StoragePermissionDialogFragment.kt @@ -24,15 +24,14 @@ import android.app.Dialog import android.os.Build import android.os.Bundle import android.os.Parcelable -import android.view.View import androidx.annotation.RequiresApi import androidx.appcompat.app.AlertDialog import androidx.core.os.bundleOf import androidx.fragment.app.DialogFragment +import com.google.android.material.button.MaterialButton import com.google.android.material.dialog.MaterialAlertDialogBuilder import com.nextcloud.client.di.Injectable import com.owncloud.android.R -import com.owncloud.android.databinding.StoragePermissionDialogBinding import com.owncloud.android.utils.theme.ViewThemeUtils import kotlinx.parcelize.Parcelize import javax.inject.Inject @@ -43,10 +42,7 @@ import javax.inject.Inject * Allows choosing "full access" (MANAGE_ALL_FILES) or "read-only media" (READ_EXTERNAL_STORAGE) */ @RequiresApi(Build.VERSION_CODES.R) -class StoragePermissionDialogFragment : - DialogFragment(), Injectable { - - private lateinit var binding: StoragePermissionDialogBinding +class StoragePermissionDialogFragment : DialogFragment(), Injectable { private var permissionRequired = false @@ -64,51 +60,48 @@ class StoragePermissionDialogFragment : super.onStart() dialog?.let { val alertDialog = it as AlertDialog - viewThemeUtils.platform.colorTextButtons(alertDialog.getButton(AlertDialog.BUTTON_NEGATIVE)) + + val positiveButton = alertDialog.getButton(AlertDialog.BUTTON_POSITIVE) as MaterialButton + viewThemeUtils.material.colorMaterialButtonPrimaryTonal(positiveButton) + + val negativeButton = alertDialog.getButton(AlertDialog.BUTTON_NEGATIVE) as MaterialButton + viewThemeUtils.material.colorMaterialButtonPrimaryBorderless(negativeButton) + + val neutralButton = alertDialog.getButton(AlertDialog.BUTTON_NEUTRAL) as MaterialButton + viewThemeUtils.material.colorMaterialButtonPrimaryBorderless(neutralButton) } } override fun onCreateDialog(savedInstanceState: Bundle?): Dialog { - // Inflate the layout for the dialog - val inflater = requireActivity().layoutInflater - binding = StoragePermissionDialogBinding.inflate(inflater, null, false) - - val view: View = binding.root + val title = when { + permissionRequired -> R.string.file_management_permission + else -> R.string.file_management_permission_optional + } val explanationResource = when { permissionRequired -> R.string.file_management_permission_text else -> R.string.file_management_permission_optional_text } - binding.storagePermissionExplanation.text = getString(explanationResource, getString(R.string.app_name)) + val message = getString(explanationResource, getString(R.string.app_name)) - // Setup layout - viewThemeUtils.material.colorMaterialButtonPrimaryFilled(binding.btnFullAccess) - binding.btnFullAccess.setOnClickListener { - setResult(Result.FULL_ACCESS) - dismiss() - } - viewThemeUtils.platform.colorTextButtons(binding.btnReadOnly) - binding.btnReadOnly.setOnClickListener { - setResult(Result.MEDIA_READ_ONLY) - dismiss() - } - - // Build the dialog - val titleResource = when { - permissionRequired -> R.string.file_management_permission - else -> R.string.file_management_permission_optional - } - - val builder = MaterialAlertDialogBuilder(binding.btnReadOnly.context) - .setTitle(titleResource) - .setView(view) - .setNegativeButton(R.string.common_cancel) { _, _ -> + val dialogBuilder = MaterialAlertDialogBuilder(requireContext()) + .setTitle(title) + .setMessage(message) + .setPositiveButton(R.string.storage_permission_full_access) { _, _ -> + setResult(Result.FULL_ACCESS) + dismiss() + } + .setNegativeButton(R.string.storage_permission_media_read_only) { _, _ -> + setResult(Result.MEDIA_READ_ONLY) + dismiss() + } + .setNeutralButton(R.string.common_cancel) { _, _ -> setResult(Result.CANCEL) dismiss() } - viewThemeUtils.dialog.colorMaterialAlertDialogBackground(binding.btnReadOnly.context, builder) + viewThemeUtils.dialog.colorMaterialAlertDialogBackground(requireContext(), dialogBuilder) - return builder.create() + return dialogBuilder.create() } private fun setResult(result: Result) { diff --git a/app/src/main/java/com/owncloud/android/ui/fragment/FileDetailActivitiesFragment.java b/app/src/main/java/com/owncloud/android/ui/fragment/FileDetailActivitiesFragment.java index 8991de8c55..871a4624a1 100644 --- a/app/src/main/java/com/owncloud/android/ui/fragment/FileDetailActivitiesFragment.java +++ b/app/src/main/java/com/owncloud/android/ui/fragment/FileDetailActivitiesFragment.java @@ -284,6 +284,10 @@ public class FileDetailActivitiesFragment extends Fragment implements }); return; } + + if (!isLoadingActivities) { + return; + } Thread t = new Thread(() -> { try { @@ -454,6 +458,11 @@ public class FileDetailActivitiesFragment extends Fragment implements public boolean shouldCallGeneratedCallback(String tag, Object callContext) { return false; } + + @VisibleForTesting + public void disableLoadingActivities() { + isLoadingActivities = false; + } private static class SubmitCommentTask extends AsyncTask { diff --git a/app/src/main/res/layout/ssl_validator_layout.xml b/app/src/main/res/layout/ssl_validator_layout.xml deleted file mode 100644 index 9b494d9d04..0000000000 --- a/app/src/main/res/layout/ssl_validator_layout.xml +++ /dev/null @@ -1,443 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/app/src/main/res/layout/storage_permission_dialog.xml b/app/src/main/res/layout/storage_permission_dialog.xml deleted file mode 100644 index 236f0d3bed..0000000000 --- a/app/src/main/res/layout/storage_permission_dialog.xml +++ /dev/null @@ -1,58 +0,0 @@ - - - - - - - - - - - \ No newline at end of file diff --git a/app/src/main/res/values-eu/strings.xml b/app/src/main/res/values-eu/strings.xml index 5c63a92ab7..bf0a2aa802 100644 --- a/app/src/main/res/values-eu/strings.xml +++ b/app/src/main/res/values-eu/strings.xml @@ -312,7 +312,7 @@ Urruneko bide-izena Transferitu Deskargatu - Kargatu + Igo Gehitu edo igo Huts egin du fitxategia deskarga-kudeatzailera pasatzean Huts egin du fitxategia inprimatzean @@ -347,7 +347,7 @@ Baimenak behar dira Biltegiratze-baimenak %1$shobeto dabil biltegia atzitzeko baimenekin. Fitxategi guztietarako sarbide osoa aukera dezakezu, edo argazki eta bideoak \"irakurtzeko soilik\" baimena eman. - %1$s-k fitxategiak kudeatzeko baimenak behar ditu fitxategiak kargatzeko. Fitxategi guztietarako sarbide osoa aukera dezakezu, edo \"irakurtzeko soilik\" baimena argazki eta bideoentzat. + %1$s-k fitxategiak kudeatzeko baimenak behar ditu fitxategiak igotzeko. Fitxategi guztietarako sarbide osoa aukera dezakezu, edo \"irakurtzeko soilik\" baimena argazki eta bideoentzat. Helburua egiaztatzen... Garbitzen… Datu-biltegiratze karpeta eguneratzen @@ -430,7 +430,7 @@ %s mm %s s %1$skarpetan - Existitzen diren fitxategiak ere kargatu + Existitzen diren fitxategiak ere igo Igo bakarrik gailua kargatzean /InstantUpload URL baliogabea @@ -439,7 +439,7 @@ Azken babeskopia: %1$s Esteka Esteka-izena - Onartu kargatzea eta edizioa + Onartu igotzea eta edizioa Edizioa Fitxategia jaregitea (igotzeko soilik) Ikustea soilik @@ -529,7 +529,7 @@ Erakutsi zerbitzariak bidalitako push jakinarazpenak: Aipamenak iruzkinetan, urruneko partekatze berrien harrera, administratzaileak argitaratutako argitalpenak etab. Push jakinarazpenak Erakutsi igoeraren egoera - Kargak + Igotzeak Jakinarazpen ikonoa Jakinarazpenik ez Begiratu beranduago, mesedez. @@ -563,13 +563,13 @@ 2012/05/18 12:23 PM gelditu txandakatu - Energia aurrezteko kontrola desgaituz gero, fitxategiak bateria baxu dagoenean kargatu litezke! + Energia aurrezteko kontrola desgaituz gero, fitxategiak bateria baxu dagoenean igo litezke! ezabatua jatorrizko karpetan mantenduko da aplikazioaren karpetara mugitu da Zer egin fitxategia dagoeneko existitzen bada? Galdetu beti - Saltatu karga + Saltatu igotzea Gainidatzi urruneko bertsioa Aldatu izena bertsio berriari Zer egin fitxategia dagoeneko existitzen bada? @@ -617,7 +617,7 @@ Erakutsi ezkutuko fitxategiak Eskuratu iturburu-kodea Datu-biltegiratze karpeta - Kudeatu karpeten kargatze automatikoa + Kudeatu karpeten igotze automatikoa Karpeta lokala Urruneko karpeta Gaia @@ -806,7 +806,7 @@ Sinkronizazioak huts egin du, hasi saioa berriz Fitxategien edukiak dagoeneko sinkronizaturik %1$s karpetaren sinkronizazioa ezin izan da osatu - 1.3.16 bertsiotik aurrera, gailu honetatik kargatzen diren fitxategiak %1$s karpeta lokalera kopiatzen dira, fitxategi bat hainbat konturekin sinkronizatzen denean datuak gal ez daitezen.\n\nAldaketa honen ondorioz, aplikazio honen aurreko bertsioekin kargatutako fitxategi guztiak %2$s karpetara kopiatu dira. Hala ere, kontua sinkronizatzean gertatutako akats batek eragiketa hori osatzea eragotzi du. Fitxategiak dauden bezala utz ditzakezu eta %3$s(r)ako esteka ezabatu, edo fitxategia(k) %1$s karpetara eraman eta %4$s(r)ako esteka mantendu.\n\nBehean zerrendatuta daude fitxategi lokala(k) eta estekatutako %5$s(e)ko urruneko fitxategia(k). + 1.3.16 bertsiotik aurrera, gailu honetatik kargatzen diren fitxategiak %1$s karpeta lokalera kopiatzen dira, fitxategi bat hainbat konturekin sinkronizatzen denean datuak gal ez daitezen.\n\nAldaketa honen ondorioz, aplikazio honen aurreko bertsioekin igotako fitxategi guztiak %2$s karpetara kopiatu dira. Hala ere, kontua sinkronizatzean gertatutako akats batek eragiketa hori osatzea eragotzi du. Fitxategiak dauden bezala utz ditzakezu eta %3$s(r)ako esteka ezabatu, edo fitxategia(k) %1$s karpetara eraman eta %4$s(r)ako esteka mantendu.\n\nBehean zerrendatuta daude fitxategi lokala(k) eta estekatutako %5$s(e)ko urruneko fitxategia(k). Fitxategi lokal batzuk ahaztu dira Fitxategiaren bertsio berriena ekartzen. Aukeratu zer sinkronizatu @@ -817,7 +817,7 @@ Fitxategiak Ezarpenak botoia Konfiguratu karpetak - Berehalako karga erabat aldatu da. Konfiguratu berriro zure karga automatikoa menu nagusitik.\n\nGozatu karga automatiko berri eta hedatuaz. + Berehalako igotzeak guztiz aldatu dira. Konfiguratu berriro zure igotze automatikoa menu nagusitik.\n\nGozatu igotze automatiko berri eta hedatuaz. Ez da multimedia karpetarik aurkitu %1$s-(r)entzat Mota @@ -863,7 +863,7 @@ Kode-zati testu-fitxategia(.txt) Sartu igoko den fitxategi-izena eta fitxategi mota Igo fitxategiak - Kargatu elementuaren ekintza botoia + Elementua igotzeko ekintza botoia Ezabatu Ezin dira fitxategiak igo Edukiak igo edo auto-igotzea aktiba ezazu. @@ -882,7 +882,7 @@ %1$s ez dago baimendua jasotako fitxategia irakurtzeko Fitxategia ezin izan da aldi baterako karpetan kopiatu. Saiatu berriro bidaltzen. Kargatzeko hautatutako fitxategia ez da aurkitu. Mesedez, egiaztatu fitxategia existitzen dela. - Fitxategi hau ezin da kargatu + Fitxategi hau ezin da igo Ez dago fitxategirik kargatzeko Karpetaren izena Aukeratu karga-karpeta diff --git a/app/src/main/res/values-ja-rJP/strings.xml b/app/src/main/res/values-ja-rJP/strings.xml index fd2971871c..8712d6f435 100644 --- a/app/src/main/res/values-ja-rJP/strings.xml +++ b/app/src/main/res/values-ja-rJP/strings.xml @@ -32,9 +32,11 @@ アクティビティ 別のリンクを作成 新規公開共有リンクを追加 + 新しいセキュアなファイルドロップを追加 %1$s に追加 高度な設定 再共有を許可 + ダッシュボードから一つのウィジェットを表示 %s の中を検索 関連付けられたアカウントが見つかりません! アクセスに失敗しました: %1$s @@ -87,11 +89,14 @@ カレンダー 証明書の読み込みに問題がありました。 開発バージョンの変更履歴 + 後で確認するか、再読込をしてください チェックボックス ローカルフォルダーを選択… + 場所を選択 リモートフォルダを選択… テンプレートを選択してファイル名を入力してください。 保存するファイルを選択 + ウィジェットを選択 通知の削除に失敗 メッセージを消去 ステータスメッセージの有効期限 @@ -152,6 +157,7 @@ ローカルファイル 両方のバージョンを選択した場合、ローカルファイルはファイル名に数字が追加されます。 サーバーファイル + 連絡先のバックアップ 連絡先リストのユーザーアイコン 許可がありません、インポートできません。 連絡先 @@ -197,13 +203,20 @@ 重複をチェックしませんでした このスマートフォンでは、ダイジェストアルゴリズムが利用できません。 ダイレクトリンクからのログインに失敗しました! + %1$s で %2$s へログインする 無効 閉じる 通知を閉じる 取り込み中 + 複数の画像 + PDFファイル + エクスポートする種類を選択 + PDFの生成に失敗しました + PDFを生成中... 完了 消去しない ローカルファイルが作成できません + ローカルファイルに対して無効なファイル名 最新の開発バージョンをダウンロード %1$sをダウンロードできませんでした ダウンロード失敗、要 再ログイン @@ -233,10 +246,14 @@ %2$s 中%1$s が使われています。 %1$s使用中 自動アップロード + E2E暗号化が未設定 + インターネット接続なしには不可能です さらに表示 ノート トーク + もっと Nextcloud アプリを見る Nextcloud ノート + Nextcloud Talk 暗号化設定 暗号化を設定する 復号化中… @@ -266,7 +283,9 @@ 問題を報告しますか? (GitHubのアカウントが必要です) ファイルの取得中にエラーが発生しました テンプレートの取得中にエラーが発生しました + 暗号化設定ダイアログの表示エラー カメラ起動エラー + 文書スキャンの開始エラー アカウント ジョブの名前 進捗状況 @@ -297,6 +316,7 @@ UIの更新に失敗しました お気に入りに追加 お気に入り + ファイル名が既に存在します 削除 ファイルのアクティビティ取得エラー 詳細のロードに失敗しました @@ -362,6 +382,7 @@ ファイル名 あなたのデータをセキュアなままコントロールしましょう セキュアなコラボレーションとファイル交換 + 使いやすいWebメールやカレンダーや & 連絡先 画面共有やオンラインミーティングやウェブ会議 フォルダーはすでに存在します 作成 @@ -388,6 +409,18 @@ パスワード サーバーが利用できません 自分のサーバーをホストする + ダッシュボードウィジェットのアイコン + 編集された + 左右反転 + 上下反転 + 反時計回りに回す + 時計回りに回す + 画像の編集が不可能です + ファイルの詳細 + ISO %s + %s MP + %s mm + %s 秒 フォルダー%1$sの中で 既存のファイルもアップロード 充電中のみアップロード @@ -408,12 +441,14 @@ ローカルファイルシステムにファイルが見つかりません %1$s/%2$s これ以上フォルダーがありません。 + フォルダーの配置 有効期限: %1$s ファイルをロック %1$sによりロック %1$sアプリによりロック %1$s アンドロイドアプリログ ログを送信するためのアプリが見つかりません。メールクライアントをインストールしてください。 + %1$sとしてログインしました ログイン %1$sをWeb画面でブラウザーで開くときのURL ログを消去 @@ -465,6 +500,8 @@ リンクを処理するアプリがありません カレンダーがありません メールアドレスの利用可能なアプリはありません + アイテムがありません + マップを処理するアプリケーションがありません 利用できるアカウントは1つだけです PDFを処理するアプリケーションがありません 選択されたファイルの送信で利用可能なアプリがありません @@ -503,11 +540,13 @@ パスコードを削除しました パスコードを保存しました パスコードが正しくありません + パスワード保護されたPDFファイルを開くことは出来ません。外部ビューワを使ってください ズームするにはページをタップ 許可 拒否 ファイルをダウンロードとアップロードする追加の権限が必要です。 画像を設定するアプリが見つかりませんでした + ホームスクリーンにピン留めする 389 KB placeholder.txt 12:23:45 @@ -537,6 +576,7 @@ もっと見る カレンダーと連絡先を毎日バックアップ 連絡先のデイリーバックアップ + End-to-end 暗号化を設定中! E2Eニーモニック ニーモニックを表示するには、デバイスクレデンシャルを有効にしてください。 メディアのスキャン結果通知を表示する @@ -546,7 +586,9 @@ インプリント 元のファイルの扱い… 元のファイルになります… + 日付を基にしたサブフォルダーに保存 サブフォルダーを利用 + このクライアントに End-to-End 暗号化を追加 ライセンス アプリパスコード デバイスの資格情報が有効です @@ -557,6 +599,7 @@ パスコード アカウント管理 友達にすすめる + end-to-end 暗号化を設定 隠しファイルを表示 ソースコードを入手 データ保存フォルダー @@ -580,6 +623,7 @@ デバイスで %1$s をお試しください あなたのデバイスで %1$s を使用してください。\nダウンロードはこちらです: %2$s %1$s または %2$s + コンテンツを更新 再読み込み (リモート) ファイルが見つかりません! @@ -600,6 +644,7 @@ ファイルを取得中... ドキュメントのロードに失敗しました。 QRコードを用いてログイン + ページをスキャン あなたのデータを保護 自己ホスト型の生産性 閲覧と共有 @@ -614,6 +659,7 @@ DAVx5で同期 検索結果の取得中にエラーが発生しました すべて選択 + メディア用のフォルダーの設定 テンプレートを選択してください テンプレートを選択する 送信 @@ -649,6 +695,7 @@ パスワード保護 編集可能 ファイルを転送 + セキュアなファイルドロップ 閲覧のみ 共有権限 %1$s (リモート) @@ -668,6 +715,8 @@ リンク経由で共有 %1$sと共有中 共有を追加できませんでした + 写真を表示 + 動画を表示 他のサービスでサインアップ %1$s があなたのNextcloudアカウント %2$s にアクセスできるようにしますか? ソート @@ -722,9 +771,13 @@ 内部ストリーミングは不可能 代わりにメディアをダウンロードするか、外部アプリを使用してください。 ストリクトモード:HTTP接続が許可されていません! + 念/月/日 + 年/月 \"%1$s\" があなたに共有されました %1$s は \"%2$s\" をあなたと共有しました + 写真のみ + 動画のみ 提案 競合が見つかりました フォルダー %1$s はもう存在しません @@ -758,6 +811,7 @@ サムネイル 既存ファイルのサムネイル 新規ファイルのサムネイル + ローディング中 期待した時間より長くかかっています 今日 ゴミ箱 削除されたファイルはありません @@ -872,6 +926,7 @@ スキップ %1$sの新機能 あなたのステータスは? + ウィジェットは %1$s 25 以上でのみ利用可能です  利用できません メールを送信 データ保存フォルダーが存在しません! @@ -894,6 +949,18 @@ 重複する応募が%d件見つかりました。 + + エクスポートされた %d ファイル + + + %dファイルのエクスポートに失敗しました + + + エラーのため、%d ファイルはエクスポートされ、他のファイルはスキップされました + + + %dファイルがエクスポートされます。詳細は通知を確認してください。 + %1$d フォルダ diff --git a/app/src/main/res/values-ko/strings.xml b/app/src/main/res/values-ko/strings.xml index efa3e6c055..4fe95c0c28 100644 --- a/app/src/main/res/values-ko/strings.xml +++ b/app/src/main/res/values-ko/strings.xml @@ -426,7 +426,7 @@ 마지막 백업: %1$s 링크 링크 이름 - 업로드 및 편집 허용 + 업로드와 수정 허용 글 수정 파일 보관소 (업로드만 허용) 읽기 전용 diff --git a/app/src/main/res/values-pt-rPT/strings.xml b/app/src/main/res/values-pt-rPT/strings.xml index 5361d53a8b..1c45a1ddbc 100644 --- a/app/src/main/res/values-pt-rPT/strings.xml +++ b/app/src/main/res/values-pt-rPT/strings.xml @@ -129,7 +129,7 @@ Mudar para a conta Sim Teste a versão de desenvolvimento - Inclui todas as futuras e mais recentes funcionalidades. Falhas/erros podem ocorrer, se e quando tal acontecer, por favor, reporte as suas descobertas. + Isto inclui todas as futuras e mais recentes funcionalidades. Podem ocorrer falhas/erros, se e quando tal acontecer, por favor, reporte as suas descobertas. fórum Ajude outros em Reveja, emende e escreva o código, consulte %1$s para detalhes. @@ -141,12 +141,12 @@ Obter versão candidata a lançamento a partir da aplicação F-Droid Obter versão candidata a lançamento a partir da loja Google Play Versão candidata a lançamento - A versão candidata a lançamento (RC) é um snapshot da próxima versão e é espectável que seja estável. Através do teste da sua configuração individual pode ajudar-nos a assegurá-lo. Para testar, inscreva-se na loja Play ou verifique a secção \"Version\" do F-Droid. + A versão candidata de lançamento (RC) é um \'\'snapshot\'\' da próxima versão e é expetável que seja estável. Se testar a sua configuração individual pode ajudar-nos a assegurá-lo. Para testar, inscreva-se na loja Play ou consulte a secção \"Version\" do F-Droid. Encontrou um erro? Ocorrências estranhas? Ajude-nos, testando Reportar um problema no Github Configure - Remove localmente a criptografia + Remove encriptação local Deseja realmente apagar %1$s? Quer realmente remover os itens seleccionados? Deseja realmente apagar %1$s e o seu conteúdo? @@ -156,7 +156,7 @@ Ficheiro em conflito %1$s Ficheiro local Se selecionou ambas as versões, o ficheiro local terá um número acrescentado ao seu nome. - Arquivo do servidor + Ficheiro do servidor Cópia de segurança dos contactos Ícone de utilizador de lista de contactos Sem permissão concedida, nada para importar. @@ -195,7 +195,7 @@ Apagar entradas Eliminar hiperligação Desseleccionado tudo - Nome do arquivo de destino + Nome do ficheiro de destino Nova versão disponível Nenhuma informação disponível. Nenhuma nova versão disponível @@ -207,12 +207,16 @@ Desativar Dispensar Dispensar notificação - Apresenta a sua frase-chave de 12 palavras + Exibe a sua frase-chave de 12 palavras Não incomodar Múltiplas imagens + Ficheiro PDF + Escolher tipo de exportação + Geração de PDF falhou + A gerar PDF... Concluído Não limpar - Não é possível criar ficheiro local + Não é possível criar o ficheiro local Transferir a última versão de desenvolvimento Não foi possível transferir %1$s A transferência falhou, inicie novamente a sessão @@ -243,7 +247,11 @@ %1$s utilizado Carregamento automático Mais + Notas Falar + Mais Aplicações Nextcloud + Nextcloud Notes + Nextcloud Talk Definir como encriptado Definir encriptação Decryption… @@ -260,15 +268,19 @@ Definir encriptação Não foi possível guardar as chaves, por favor, tente novamente. Erro ao encriptar. Palavra-passe errada? + Inserir nome do ficheiro de destino Por favor, introduza um nome para o ficheiro Não foi possível copiar %1$s para a pasta local %2$s Erro crítico: impossível concluir a operação Erro ao escolher a data Erro ao comentar ficheiro %1$s crachou + Erro ao criar o ficheiro com o modelo + Erro ao mostrar as ações do ficheiro Relatório Erro ao obter o ficheiro Erro ao obter modelos + Erro ao mostrar a janela da configuração de encriptação! Erro ao iniciar câmara Contas Nome do Trabalho @@ -294,11 +306,12 @@ Enviar Adicionar ou enviar Falhou a passagem do ficheiro ao gestor de transferências - Falhou a impressão do ficheiro + Não foi possível imprimir o ficheiro Falha ao iniciar o editor Falha ao atualizar a IU Adicionar aos favoritos Favorito + O nome do ficheiro já existe Apagar Erro ao obter as atividades para o ficheiro Falha ao carregar detalhes @@ -312,10 +325,10 @@ Sem resultados nesta pasta Sem resultados Não está aqui nada. Pode adicionar uma pasta. - Ficheiros e pastas que foram descarregados aparecem aqui. + Os ficheiros e as pastas que foram transferidos serão mostrados aqui. Não foi encontrado nenhum arquivo modificado nos últimos 7 dias Poderá estar numa pasta diferente? - Ficheiros e pastas que partilhou aparecem aqui. + Os ficheiros e as pastas que partilhou serão mostrados aqui. Ainda sem partilhas Nenhum resultado encontrado para a sua consulta pasta @@ -323,6 +336,7 @@ Nenhuma aplicação para usar este tipo de ficheiro. há segundos Permissões necessárias + Permissões de armazenamento %1$s precisa de permissões de gestão de ficheiros para carregar ficheiros. Pode escolher acesso total a todos os ficheiros ou acesso só de leitura a fotografias e vídeos. Verificando destino… Limpando… @@ -389,11 +403,11 @@ Servidor não disponível Hospede o seu próprio servidor Ícone para lista vazia - Ícone do widget do painel de controlo - Ícone do widget da entrada + Ícone do \'\'widget\'\' do painel de controlo + Ícone do \'\'widget\'\' da entrada editado - Virar horizontalmente - Virar verticalmente + Inverter horizontalmente + Inverter verticalmente Rodar no sentido anti-horário Rodar no sentido horário Não é possível editar a imagem. @@ -410,7 +424,7 @@ /Envio Instantâneo URL inválido Invisível - Nome não pode ficar em branco + O nome não pode ficar em branco Última cópia de segurança: %1$s Hiperligação Nome da hiperligação @@ -424,9 +438,14 @@ Ficheiros não encontrados no sistema de ficheiros local %1$s/%2$s Não existem mais pastas. + Localizar pasta + Expira: %1$s Bloquear ficheiro + Bloqueado por %1$s + Bloqueado por aplicação %1$s %1$s registos de aplicação Android Não foi encontrada nenhuma aplicação para o envio de registos. Por favor, Instale um cliente de correio eletrónico. + Autenticado como %1$s Iniciar Sessão A hiperligação para a sua interface da Web %1$s quando a abre no seu navegador. Eliminar registos @@ -474,10 +493,14 @@ vídeo Nova notificação Uma nova versão foi criada + Sem ações para este utilizador Nenhuma aplicação disponível para lidar com links O calendário não existe + Sem itens Só é permitida uma conta. Nenhuma aplicação disponível para lidar com PDF + Nenhuma aplicação disponível para enviar os ficheiros selecionados + Por favor, selecione pelo menos uma permissão para partilhar. Enviar Não foi possível enviar a nota Ícone de nota @@ -516,6 +539,8 @@ Negar Permissões adicionais são necessárias para enviar e transferir ficheiros. Nenhuma aplicação encontrada para definir a imagem + Afixar no ecrã Início + Abrir %1$s 389 KB placeholder.txt 12:23:45 @@ -555,7 +580,7 @@ Informação O ficheiro original será… O ficheiro original será… - Armazenar em subpastas com base na data + Guardar nas subpastas com base na data Usar Subpastas Opções de subpasta Licença @@ -568,6 +593,7 @@ Código Gerir contas Recomendar a um amigo + Remover encriptação localmente Configurar a encriptação ponta-a-ponta Mostrar alternador de aplicações Sugestões de aplicações Nextcloud no cabeçalho da navegação @@ -646,6 +672,7 @@ Defina a mensagem de estado Durante a configuração da encriptação ponta-a-ponta, receberá uma mnemónica aleatória de 12 palavras, de que necessitará para abrir os seus ficheiros noutros dispositivos. Ela só será guardada neste dispositivo e pode ser mostrada novamente neste ecrã. Por favor, anote-a num local seguro! Partilhar + Hiperligação de Partilhar e Copiar Partilha %1$s Expira %1$s @@ -686,6 +713,8 @@ Partilhado via hiperligação Partilhado consigo por %1$s Adição de destinatário da partilha falhou + Mostrar fotografias + Mostrar vídeos Registar com fornecedor Permitir que %1$s aceda à sua conta Nextcloud %2$s? Ordenar por @@ -738,9 +767,13 @@ Transmita com… Transmissão interna não é possível Em vez disso, por favor, transfira mediateca ou utilize uma aplicação externa. + Ano/Mês/Dia + Ano/Mês + Ano \"%1$s\" foi partilhado consigo %1$s partilhou \"%2$s\" consigo - Fotos & videos + Apenas fotografias + Fotografias e vídeos Apenas vídeos Sugerir Encontrados conflitos @@ -791,12 +824,12 @@ Aproveite o novo e melhorado envio automático. Encriptação não definida Remover dos favoritos Ocorreu um erro enquanto tentava remover a partilha deste ficheiro ou pasta. - Impossível eliminar a partilha. Verifique se o ficheiro existe. + Não é possível remover a partilha. Por favor, verifique se o ficheiro existe. para cancelar a partilha deste ficheiro Cancelamento da partilha falhou Acesso através de domínio não confiável. Por favor, verifique a documentação para mais informações. - Erro ao tentar modificar a partilha. - Impossível modificar. Verifique se o ficheiro existe. + Ocorreu um erro enquanto tentava atualizar a partilha. + Não é possível atualizar. Por favor, verifique se o ficheiro existe. para atualizar esta partilha Actualização da partilha falhou Não é possível criar ficheiro local @@ -835,7 +868,7 @@ Aproveite o novo e melhorado envio automático. Escolha uma pasta para envio Não foi possível enviar %1$s O envio falhou, inicie novamente a sessão - Exite um conflito com o ficheiro enviado + Conflito de envio do ficheiro Escolha qual das versões manter %1$s Envio falhou Opção de envio: @@ -907,6 +940,26 @@ Aproveite o novo e melhorado envio automático. Falha ao copiar %1$d ficheiros da pasta %2$s para Falha ao copiar %1$d ficheiros da pasta %2$s para + + Processada %d entrada. + Processadas %dentradas. + Processadas %d entradas. + + + Encontrada %d entrada duplicada. + Encontradas %d entradas duplicadas. + Encontradas %d entradas duplicadas. + + + Exportado %d ficheiro + Exportados %d ficheiros + Exportados %d ficheiros + + + Falhou exportação de %d ficheiro + Falhou exportação de %d ficheiros + Falhou exportação de %d ficheiros + %1$d pasta %1$d pastas diff --git a/app/src/main/res/values/dims.xml b/app/src/main/res/values/dims.xml index 3805116abc..3430bee41c 100644 --- a/app/src/main/res/values/dims.xml +++ b/app/src/main/res/values/dims.xml @@ -79,7 +79,6 @@ 20dp 12sp 20dp - 180dp 60dp 12sp 12dp diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index e06538ddf5..75112b2125 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -800,8 +800,6 @@ Deny Allow Note to recipient - Send - Send note to recipient Could not send note Note No app available to handle links diff --git a/scripts/analysis/analysis-wrapper.sh b/scripts/analysis/analysis-wrapper.sh index 8770f1d240..81e04ec2e1 100755 --- a/scripts/analysis/analysis-wrapper.sh +++ b/scripts/analysis/analysis-wrapper.sh @@ -128,7 +128,7 @@ else # check for NotNull if [[ $(grep org.jetbrains.annotations app/src/main/* -irl | wc -l) -gt 0 ]] ; then - notNull="org.jetbrains.annotations.NotNull is used. Please use androidx.annotation.NonNull instead.

" + notNull="org.jetbrains.annotations.* is used. Please use androidx.annotation.* instead.

" fi bodyContent="$codacyResult $lintResult $spotbugsResult $checkLibraryMessage $lintMessage $spotbugsMessage $gplayLimitation $notNull"