Merge pull request #2401 from KryptKode/fix/editor-sdk30+
SDK 30+ changes for Editor
This commit is contained in:
commit
c3a71b8102
40 changed files with 45 additions and 44 deletions
|
@ -77,7 +77,7 @@ android {
|
||||||
}
|
}
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
implementation 'com.github.SimpleMobileTools:Simple-Commons:38f1c0331c'
|
implementation 'com.github.SimpleMobileTools:Simple-Commons:69ac8d3f2f'
|
||||||
implementation 'com.theartofdev.edmodo:android-image-cropper:2.8.0'
|
implementation 'com.theartofdev.edmodo:android-image-cropper:2.8.0'
|
||||||
implementation 'it.sephiroth.android.exif:library:1.0.1'
|
implementation 'it.sephiroth.android.exif:library:1.0.1'
|
||||||
implementation 'pl.droidsonroids.gif:android-gif-drawable:1.2.24'
|
implementation 'pl.droidsonroids.gif:android-gif-drawable:1.2.24'
|
||||||
|
|
|
@ -28,6 +28,7 @@ import com.bumptech.glide.request.target.Target
|
||||||
import com.simplemobiletools.commons.dialogs.ColorPickerDialog
|
import com.simplemobiletools.commons.dialogs.ColorPickerDialog
|
||||||
import com.simplemobiletools.commons.dialogs.ConfirmationDialog
|
import com.simplemobiletools.commons.dialogs.ConfirmationDialog
|
||||||
import com.simplemobiletools.commons.extensions.*
|
import com.simplemobiletools.commons.extensions.*
|
||||||
|
import com.simplemobiletools.commons.helpers.PERMISSION_WRITE_STORAGE
|
||||||
import com.simplemobiletools.commons.helpers.REAL_FILE_PATH
|
import com.simplemobiletools.commons.helpers.REAL_FILE_PATH
|
||||||
import com.simplemobiletools.commons.helpers.ensureBackgroundThread
|
import com.simplemobiletools.commons.helpers.ensureBackgroundThread
|
||||||
import com.simplemobiletools.commons.helpers.isNougatPlus
|
import com.simplemobiletools.commons.helpers.isNougatPlus
|
||||||
|
@ -101,7 +102,13 @@ class EditActivity : SimpleActivity(), CropImageView.OnCropImageCompleteListener
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
initEditActivity()
|
handlePermission(PERMISSION_WRITE_STORAGE){
|
||||||
|
if (!it) {
|
||||||
|
toast(R.string.no_storage_permissions)
|
||||||
|
finish()
|
||||||
|
}
|
||||||
|
initEditActivity()
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun onResume() {
|
override fun onResume() {
|
||||||
|
|
|
@ -112,7 +112,7 @@ class PickDirectoryDialog(
|
||||||
activity.toast(R.string.source_and_destination_same)
|
activity.toast(R.string.source_and_destination_same)
|
||||||
return@DirectoryAdapter
|
return@DirectoryAdapter
|
||||||
} else if (isRPlus() && path.isBasePath(activity)) {
|
} else if (isRPlus() && path.isBasePath(activity)) {
|
||||||
activity.toast(R.string.copy_to_restricted_folder_message)
|
activity.toast(R.string.system_folder_restriction)
|
||||||
return@DirectoryAdapter
|
return@DirectoryAdapter
|
||||||
} else {
|
} else {
|
||||||
activity.handleLockedFolderOpening(path) { success ->
|
activity.handleLockedFolderOpening(path) { success ->
|
||||||
|
|
|
@ -5,7 +5,9 @@ import com.simplemobiletools.commons.activities.BaseSimpleActivity
|
||||||
import com.simplemobiletools.commons.dialogs.ConfirmationDialog
|
import com.simplemobiletools.commons.dialogs.ConfirmationDialog
|
||||||
import com.simplemobiletools.commons.dialogs.FilePickerDialog
|
import com.simplemobiletools.commons.dialogs.FilePickerDialog
|
||||||
import com.simplemobiletools.commons.extensions.*
|
import com.simplemobiletools.commons.extensions.*
|
||||||
|
import com.simplemobiletools.commons.helpers.isRPlus
|
||||||
import com.simplemobiletools.gallery.pro.R
|
import com.simplemobiletools.gallery.pro.R
|
||||||
|
import java.io.File
|
||||||
import kotlinx.android.synthetic.main.dialog_save_as.view.*
|
import kotlinx.android.synthetic.main.dialog_save_as.view.*
|
||||||
|
|
||||||
class SaveAsDialog(
|
class SaveAsDialog(
|
||||||
|
@ -15,6 +17,9 @@ class SaveAsDialog(
|
||||||
|
|
||||||
init {
|
init {
|
||||||
var realPath = path.getParentPath()
|
var realPath = path.getParentPath()
|
||||||
|
if (activity.isRestrictedWithSAFSdk30(realPath) && !activity.isInDownloadDir(realPath)) {
|
||||||
|
realPath = activity.getPicturesDirectoryPath(realPath)
|
||||||
|
}
|
||||||
|
|
||||||
val view = activity.layoutInflater.inflate(R.layout.dialog_save_as, null).apply {
|
val view = activity.layoutInflater.inflate(R.layout.dialog_save_as, null).apply {
|
||||||
save_as_path.text = "${activity.humanizePath(realPath).trimEnd('/')}/"
|
save_as_path.text = "${activity.humanizePath(realPath).trimEnd('/')}/"
|
||||||
|
@ -74,15 +79,36 @@ class SaveAsDialog(
|
||||||
if (activity.getDoesFilePathExist(newPath)) {
|
if (activity.getDoesFilePathExist(newPath)) {
|
||||||
val title = String.format(activity.getString(R.string.file_already_exists_overwrite), newFilename)
|
val title = String.format(activity.getString(R.string.file_already_exists_overwrite), newFilename)
|
||||||
ConfirmationDialog(activity, title) {
|
ConfirmationDialog(activity, title) {
|
||||||
callback(newPath)
|
val newFile = File(newPath)
|
||||||
dismiss()
|
val isInDownloadDir = activity.isInDownloadDir(newPath)
|
||||||
|
val isInSubFolderInDownloadDir = activity.isInSubFolderInDownloadDir(newPath)
|
||||||
|
if (isRPlus() && isInDownloadDir && !isInSubFolderInDownloadDir && !newFile.canWrite()) {
|
||||||
|
val fileDirItem = arrayListOf(File(newPath).toFileDirItem(activity))
|
||||||
|
val fileUris = activity.getFileUrisFromFileDirItems(fileDirItem).second
|
||||||
|
activity.updateSDK30Uris(fileUris) { success ->
|
||||||
|
if (success) {
|
||||||
|
selectPath(this, newPath)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
selectPath(this, newPath)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
callback(newPath)
|
selectPath(this, newPath)
|
||||||
dismiss()
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private fun selectPath(alertDialog: AlertDialog, newPath: String) {
|
||||||
|
activity.handleSAFDialogSdk30(newPath) {
|
||||||
|
if (!it) {
|
||||||
|
return@handleSAFDialogSdk30
|
||||||
|
}
|
||||||
|
callback(newPath)
|
||||||
|
alertDialog.dismiss()
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -39,7 +39,6 @@
|
||||||
<string name="set_as_default_folder">تعيين كمجلد افتراضي</string>
|
<string name="set_as_default_folder">تعيين كمجلد افتراضي</string>
|
||||||
<string name="unset_as_default_folder">إلغاء التعيين كمجلد افتراضي</string>
|
<string name="unset_as_default_folder">إلغاء التعيين كمجلد افتراضي</string>
|
||||||
<string name="reorder_by_dragging">إعادة ترتيب المجلدات عن طريق السحب</string>
|
<string name="reorder_by_dragging">إعادة ترتيب المجلدات عن طريق السحب</string>
|
||||||
<string name="copy_to_restricted_folder_message">The system does not allow copying to this folder.</string>
|
|
||||||
|
|
||||||
<!-- Filter -->
|
<!-- Filter -->
|
||||||
<string name="filter_media">فلترة الوسائط</string>
|
<string name="filter_media">فلترة الوسائط</string>
|
||||||
|
|
|
@ -33,7 +33,6 @@
|
||||||
<string name="set_as_default_folder">Set as default folder</string>
|
<string name="set_as_default_folder">Set as default folder</string>
|
||||||
<string name="unset_as_default_folder">Unset as default folder</string>
|
<string name="unset_as_default_folder">Unset as default folder</string>
|
||||||
<string name="reorder_by_dragging">Reorder folders by dragging</string>
|
<string name="reorder_by_dragging">Reorder folders by dragging</string>
|
||||||
<string name="copy_to_restricted_folder_message">The system does not allow copying to this folder.</string>
|
|
||||||
|
|
||||||
<!-- Filter -->
|
<!-- Filter -->
|
||||||
<string name="filter_media">Filter media</string>
|
<string name="filter_media">Filter media</string>
|
||||||
|
|
|
@ -33,7 +33,6 @@
|
||||||
<string name="set_as_default_folder">ডিফল্ট ফোল্ডার হিশেবে সেট করুন</string>
|
<string name="set_as_default_folder">ডিফল্ট ফোল্ডার হিশেবে সেট করুন</string>
|
||||||
<string name="unset_as_default_folder">ডিফল্ট ফোল্ডার হিশেবে আর রাখবেন না</string>
|
<string name="unset_as_default_folder">ডিফল্ট ফোল্ডার হিশেবে আর রাখবেন না</string>
|
||||||
<string name="reorder_by_dragging">Reorder folders by dragging</string>
|
<string name="reorder_by_dragging">Reorder folders by dragging</string>
|
||||||
<string name="copy_to_restricted_folder_message">The system does not allow copying to this folder.</string>
|
|
||||||
|
|
||||||
<!-- Filter -->
|
<!-- Filter -->
|
||||||
<string name="filter_media">মিডিয়া ফিল্টার করুন</string>
|
<string name="filter_media">মিডিয়া ফিল্টার করুন</string>
|
||||||
|
|
|
@ -33,7 +33,6 @@
|
||||||
<string name="set_as_default_folder">Set as default folder</string>
|
<string name="set_as_default_folder">Set as default folder</string>
|
||||||
<string name="unset_as_default_folder">Unset as default folder</string>
|
<string name="unset_as_default_folder">Unset as default folder</string>
|
||||||
<string name="reorder_by_dragging">Reorder folders by dragging</string>
|
<string name="reorder_by_dragging">Reorder folders by dragging</string>
|
||||||
<string name="copy_to_restricted_folder_message">The system does not allow copying to this folder.</string>
|
|
||||||
|
|
||||||
<!-- Filter -->
|
<!-- Filter -->
|
||||||
<string name="filter_media">Filtr médií</string>
|
<string name="filter_media">Filtr médií</string>
|
||||||
|
|
|
@ -33,7 +33,6 @@
|
||||||
<string name="set_as_default_folder">Vælg som standardmappe</string>
|
<string name="set_as_default_folder">Vælg som standardmappe</string>
|
||||||
<string name="unset_as_default_folder">Fravælg som standardmappe</string>
|
<string name="unset_as_default_folder">Fravælg som standardmappe</string>
|
||||||
<string name="reorder_by_dragging">Omorganiser mapper ved at trække</string>
|
<string name="reorder_by_dragging">Omorganiser mapper ved at trække</string>
|
||||||
<string name="copy_to_restricted_folder_message">The system does not allow copying to this folder.</string>
|
|
||||||
|
|
||||||
<!-- Filter -->
|
<!-- Filter -->
|
||||||
<string name="filter_media">Filtrer medier</string>
|
<string name="filter_media">Filtrer medier</string>
|
||||||
|
|
|
@ -39,7 +39,6 @@
|
||||||
<string name="set_as_default_folder">Als Standardordner festlegen</string>
|
<string name="set_as_default_folder">Als Standardordner festlegen</string>
|
||||||
<string name="unset_as_default_folder">Nicht mehr als Standardordner festlegen</string>
|
<string name="unset_as_default_folder">Nicht mehr als Standardordner festlegen</string>
|
||||||
<string name="reorder_by_dragging">Neuordnung von Ordnern durch Ziehen</string>
|
<string name="reorder_by_dragging">Neuordnung von Ordnern durch Ziehen</string>
|
||||||
<string name="copy_to_restricted_folder_message">Das System lässt das Kopieren in diesen Ordner nicht zu.</string>
|
|
||||||
<!-- Filter -->
|
<!-- Filter -->
|
||||||
<string name="filter_media">Medien filtern</string>
|
<string name="filter_media">Medien filtern</string>
|
||||||
<string name="images">Bilder</string>
|
<string name="images">Bilder</string>
|
||||||
|
|
|
@ -33,7 +33,6 @@
|
||||||
<string name="set_as_default_folder">Set as default folder</string>
|
<string name="set_as_default_folder">Set as default folder</string>
|
||||||
<string name="unset_as_default_folder">Unset as default folder</string>
|
<string name="unset_as_default_folder">Unset as default folder</string>
|
||||||
<string name="reorder_by_dragging">Reorder folders by dragging</string>
|
<string name="reorder_by_dragging">Reorder folders by dragging</string>
|
||||||
<string name="copy_to_restricted_folder_message">The system does not allow copying to this folder.</string>
|
|
||||||
<!-- Filter -->
|
<!-- Filter -->
|
||||||
<string name="filter_media">Filter media</string>
|
<string name="filter_media">Filter media</string>
|
||||||
<string name="images">Bildoj</string>
|
<string name="images">Bildoj</string>
|
||||||
|
|
|
@ -33,7 +33,6 @@
|
||||||
<string name="set_as_default_folder">Poner como carpeta predeterminada</string>
|
<string name="set_as_default_folder">Poner como carpeta predeterminada</string>
|
||||||
<string name="unset_as_default_folder">Quitar como carpeta predeterminada</string>
|
<string name="unset_as_default_folder">Quitar como carpeta predeterminada</string>
|
||||||
<string name="reorder_by_dragging">Reordenar carpetas arrastrándolas</string>
|
<string name="reorder_by_dragging">Reordenar carpetas arrastrándolas</string>
|
||||||
<string name="copy_to_restricted_folder_message">The system does not allow copying to this folder.</string>
|
|
||||||
|
|
||||||
<!-- Filter -->
|
<!-- Filter -->
|
||||||
<string name="filter_media">Filtro de medios</string>
|
<string name="filter_media">Filtro de medios</string>
|
||||||
|
|
|
@ -33,7 +33,6 @@
|
||||||
<string name="set_as_default_folder">Set as default folder</string>
|
<string name="set_as_default_folder">Set as default folder</string>
|
||||||
<string name="unset_as_default_folder">Unset as default folder</string>
|
<string name="unset_as_default_folder">Unset as default folder</string>
|
||||||
<string name="reorder_by_dragging">Reorder folders by dragging</string>
|
<string name="reorder_by_dragging">Reorder folders by dragging</string>
|
||||||
<string name="copy_to_restricted_folder_message">The system does not allow copying to this folder.</string>
|
|
||||||
|
|
||||||
<!-- Filter -->
|
<!-- Filter -->
|
||||||
<string name="filter_media">Filter media</string>
|
<string name="filter_media">Filter media</string>
|
||||||
|
|
|
@ -33,7 +33,6 @@
|
||||||
<string name="set_as_default_folder">Ezarri lehenetsitako karpeta gisa</string>
|
<string name="set_as_default_folder">Ezarri lehenetsitako karpeta gisa</string>
|
||||||
<string name="unset_as_default_folder">Kendu karpeta lehenetsitako karpeta gisa</string>
|
<string name="unset_as_default_folder">Kendu karpeta lehenetsitako karpeta gisa</string>
|
||||||
<string name="reorder_by_dragging">Berrordenatu karpetak arrastatuz</string>
|
<string name="reorder_by_dragging">Berrordenatu karpetak arrastatuz</string>
|
||||||
<string name="copy_to_restricted_folder_message">The system does not allow copying to this folder.</string>
|
|
||||||
|
|
||||||
<!-- Filter -->
|
<!-- Filter -->
|
||||||
<string name="filter_media">Iragazi multimedia</string>
|
<string name="filter_media">Iragazi multimedia</string>
|
||||||
|
|
|
@ -33,7 +33,6 @@
|
||||||
<string name="set_as_default_folder">تنظیم به عنوان شاخهٔ پیشگزیده</string>
|
<string name="set_as_default_folder">تنظیم به عنوان شاخهٔ پیشگزیده</string>
|
||||||
<string name="unset_as_default_folder">برداشتن تنظیم به عنوان شاخهٔ پیشگزیده</string>
|
<string name="unset_as_default_folder">برداشتن تنظیم به عنوان شاخهٔ پیشگزیده</string>
|
||||||
<string name="reorder_by_dragging">مرتبسازی مجدد شاخهها با کشیدن</string>
|
<string name="reorder_by_dragging">مرتبسازی مجدد شاخهها با کشیدن</string>
|
||||||
<string name="copy_to_restricted_folder_message">The system does not allow copying to this folder.</string>
|
|
||||||
|
|
||||||
<!-- Filter -->
|
<!-- Filter -->
|
||||||
<string name="filter_media">پالایش رسانه</string>
|
<string name="filter_media">پالایش رسانه</string>
|
||||||
|
|
|
@ -39,7 +39,6 @@
|
||||||
<string name="set_as_default_folder">Aseta oletushakemistoksi</string>
|
<string name="set_as_default_folder">Aseta oletushakemistoksi</string>
|
||||||
<string name="unset_as_default_folder">Älä käytä oletushakemistona</string>
|
<string name="unset_as_default_folder">Älä käytä oletushakemistona</string>
|
||||||
<string name="reorder_by_dragging">Järjestä kansiot uudelleen vetämällä</string>
|
<string name="reorder_by_dragging">Järjestä kansiot uudelleen vetämällä</string>
|
||||||
<string name="copy_to_restricted_folder_message">The system does not allow copying to this folder.</string>
|
|
||||||
|
|
||||||
<!-- Filter -->
|
<!-- Filter -->
|
||||||
<string name="filter_media">Suodata media</string>
|
<string name="filter_media">Suodata media</string>
|
||||||
|
|
|
@ -33,7 +33,6 @@
|
||||||
<string name="set_as_default_folder">Dossier par défaut</string>
|
<string name="set_as_default_folder">Dossier par défaut</string>
|
||||||
<string name="unset_as_default_folder">Oublier le dossier</string>
|
<string name="unset_as_default_folder">Oublier le dossier</string>
|
||||||
<string name="reorder_by_dragging">Réordonner par glisser</string>
|
<string name="reorder_by_dragging">Réordonner par glisser</string>
|
||||||
<string name="copy_to_restricted_folder_message">Le système ne permet pas de copier dans ce dossier.</string>
|
|
||||||
<!-- Filter -->
|
<!-- Filter -->
|
||||||
<string name="filter_media">Filtrer les médias</string>
|
<string name="filter_media">Filtrer les médias</string>
|
||||||
<string name="images">Images</string>
|
<string name="images">Images</string>
|
||||||
|
|
|
@ -33,7 +33,6 @@
|
||||||
<string name="set_as_default_folder">Set as default folder</string>
|
<string name="set_as_default_folder">Set as default folder</string>
|
||||||
<string name="unset_as_default_folder">Unset as default folder</string>
|
<string name="unset_as_default_folder">Unset as default folder</string>
|
||||||
<string name="reorder_by_dragging">Reorder folders by dragging</string>
|
<string name="reorder_by_dragging">Reorder folders by dragging</string>
|
||||||
<string name="copy_to_restricted_folder_message">The system does not allow copying to this folder.</string>
|
|
||||||
<!-- Filter -->
|
<!-- Filter -->
|
||||||
<string name="filter_media">Filtrar medios</string>
|
<string name="filter_media">Filtrar medios</string>
|
||||||
<string name="images">Imaxes</string>
|
<string name="images">Imaxes</string>
|
||||||
|
|
|
@ -33,7 +33,6 @@
|
||||||
<string name="set_as_default_folder">Set as default folder</string>
|
<string name="set_as_default_folder">Set as default folder</string>
|
||||||
<string name="unset_as_default_folder">Unset as default folder</string>
|
<string name="unset_as_default_folder">Unset as default folder</string>
|
||||||
<string name="reorder_by_dragging">Reorder folders by dragging</string>
|
<string name="reorder_by_dragging">Reorder folders by dragging</string>
|
||||||
<string name="copy_to_restricted_folder_message">The system does not allow copying to this folder.</string>
|
|
||||||
<!-- Filter -->
|
<!-- Filter -->
|
||||||
<string name="filter_media">Filtriranje medija</string>
|
<string name="filter_media">Filtriranje medija</string>
|
||||||
<string name="images">Slike</string>
|
<string name="images">Slike</string>
|
||||||
|
|
|
@ -39,7 +39,6 @@
|
||||||
<string name="set_as_default_folder">Beállítás alapértelmezett mappaként</string>
|
<string name="set_as_default_folder">Beállítás alapértelmezett mappaként</string>
|
||||||
<string name="unset_as_default_folder">Eltávolítás mint alapértelmezett mappa</string>
|
<string name="unset_as_default_folder">Eltávolítás mint alapértelmezett mappa</string>
|
||||||
<string name="reorder_by_dragging">Mappák átrendezése húzással</string>
|
<string name="reorder_by_dragging">Mappák átrendezése húzással</string>
|
||||||
<string name="copy_to_restricted_folder_message">The system does not allow copying to this folder.</string>
|
|
||||||
|
|
||||||
<!-- Filter -->
|
<!-- Filter -->
|
||||||
<string name="filter_media">Médiafájlok szűrése</string>
|
<string name="filter_media">Médiafájlok szűrése</string>
|
||||||
|
|
|
@ -33,7 +33,6 @@
|
||||||
<string name="set_as_default_folder">Set as default folder</string>
|
<string name="set_as_default_folder">Set as default folder</string>
|
||||||
<string name="unset_as_default_folder">Unset as default folder</string>
|
<string name="unset_as_default_folder">Unset as default folder</string>
|
||||||
<string name="reorder_by_dragging">Reorder folders by dragging</string>
|
<string name="reorder_by_dragging">Reorder folders by dragging</string>
|
||||||
<string name="copy_to_restricted_folder_message">The system does not allow copying to this folder.</string>
|
|
||||||
|
|
||||||
<!-- Filter -->
|
<!-- Filter -->
|
||||||
<string name="filter_media">Filter media</string>
|
<string name="filter_media">Filter media</string>
|
||||||
|
|
|
@ -33,7 +33,6 @@
|
||||||
<string name="set_as_default_folder">Imposta come cartella predefinita</string>
|
<string name="set_as_default_folder">Imposta come cartella predefinita</string>
|
||||||
<string name="unset_as_default_folder">Non impostare come cartella predefinita</string>
|
<string name="unset_as_default_folder">Non impostare come cartella predefinita</string>
|
||||||
<string name="reorder_by_dragging">Riordina cartelle trascinandole</string>
|
<string name="reorder_by_dragging">Riordina cartelle trascinandole</string>
|
||||||
<string name="copy_to_restricted_folder_message">Il sistema non permette di copiare in questa cartella.</string>
|
|
||||||
<!-- Filter -->
|
<!-- Filter -->
|
||||||
<string name="filter_media">Filtra i file</string>
|
<string name="filter_media">Filtra i file</string>
|
||||||
<string name="images">Immagini</string>
|
<string name="images">Immagini</string>
|
||||||
|
|
|
@ -33,7 +33,6 @@
|
||||||
<string name="set_as_default_folder">デフォルトのフォルダとして設定</string>
|
<string name="set_as_default_folder">デフォルトのフォルダとして設定</string>
|
||||||
<string name="unset_as_default_folder">デフォルトのフォルダから外す</string>
|
<string name="unset_as_default_folder">デフォルトのフォルダから外す</string>
|
||||||
<string name="reorder_by_dragging">Reorder folders by dragging</string>
|
<string name="reorder_by_dragging">Reorder folders by dragging</string>
|
||||||
<string name="copy_to_restricted_folder_message">The system does not allow copying to this folder.</string>
|
|
||||||
|
|
||||||
<!-- Filter -->
|
<!-- Filter -->
|
||||||
<string name="filter_media">表示する形式</string>
|
<string name="filter_media">表示する形式</string>
|
||||||
|
|
|
@ -33,7 +33,6 @@
|
||||||
<string name="set_as_default_folder">Set as default folder</string>
|
<string name="set_as_default_folder">Set as default folder</string>
|
||||||
<string name="unset_as_default_folder">Unset as default folder</string>
|
<string name="unset_as_default_folder">Unset as default folder</string>
|
||||||
<string name="reorder_by_dragging">Reorder folders by dragging</string>
|
<string name="reorder_by_dragging">Reorder folders by dragging</string>
|
||||||
<string name="copy_to_restricted_folder_message">The system does not allow copying to this folder.</string>
|
|
||||||
|
|
||||||
<!-- Filter -->
|
<!-- Filter -->
|
||||||
<string name="filter_media">필터 설정</string>
|
<string name="filter_media">필터 설정</string>
|
||||||
|
|
|
@ -33,7 +33,6 @@
|
||||||
<string name="set_as_default_folder">Set as default folder</string>
|
<string name="set_as_default_folder">Set as default folder</string>
|
||||||
<string name="unset_as_default_folder">Unset as default folder</string>
|
<string name="unset_as_default_folder">Unset as default folder</string>
|
||||||
<string name="reorder_by_dragging">Reorder folders by dragging</string>
|
<string name="reorder_by_dragging">Reorder folders by dragging</string>
|
||||||
<string name="copy_to_restricted_folder_message">The system does not allow copying to this folder.</string>
|
|
||||||
|
|
||||||
<!-- Filter -->
|
<!-- Filter -->
|
||||||
<string name="filter_media">Filtruoti mediją</string>
|
<string name="filter_media">Filtruoti mediją</string>
|
||||||
|
|
|
@ -33,7 +33,6 @@
|
||||||
<string name="set_as_default_folder">Sett som standardmappe</string>
|
<string name="set_as_default_folder">Sett som standardmappe</string>
|
||||||
<string name="unset_as_default_folder">Ikke lenger sett som standardmappe</string>
|
<string name="unset_as_default_folder">Ikke lenger sett som standardmappe</string>
|
||||||
<string name="reorder_by_dragging">Endre mapperekkefølge ved å dra</string>
|
<string name="reorder_by_dragging">Endre mapperekkefølge ved å dra</string>
|
||||||
<string name="copy_to_restricted_folder_message">The system does not allow copying to this folder.</string>
|
|
||||||
|
|
||||||
<!-- Filter -->
|
<!-- Filter -->
|
||||||
<string name="filter_media">Filtrer media</string>
|
<string name="filter_media">Filtrer media</string>
|
||||||
|
|
|
@ -33,7 +33,6 @@
|
||||||
<string name="set_as_default_folder">Set as default folder</string>
|
<string name="set_as_default_folder">Set as default folder</string>
|
||||||
<string name="unset_as_default_folder">Unset as default folder</string>
|
<string name="unset_as_default_folder">Unset as default folder</string>
|
||||||
<string name="reorder_by_dragging">Reorder folders by dragging</string>
|
<string name="reorder_by_dragging">Reorder folders by dragging</string>
|
||||||
<string name="copy_to_restricted_folder_message">The system does not allow copying to this folder.</string>
|
|
||||||
|
|
||||||
<!-- Filter -->
|
<!-- Filter -->
|
||||||
<string name="filter_media">Filter media</string>
|
<string name="filter_media">Filter media</string>
|
||||||
|
|
|
@ -39,7 +39,6 @@
|
||||||
<string name="set_as_default_folder">Definir como pasta padrão</string>
|
<string name="set_as_default_folder">Definir como pasta padrão</string>
|
||||||
<string name="unset_as_default_folder">Indefinir como pasta padrão</string>
|
<string name="unset_as_default_folder">Indefinir como pasta padrão</string>
|
||||||
<string name="reorder_by_dragging">Reordenar as pastas ao arrastar</string>
|
<string name="reorder_by_dragging">Reordenar as pastas ao arrastar</string>
|
||||||
<string name="copy_to_restricted_folder_message">The system does not allow copying to this folder.</string>
|
|
||||||
|
|
||||||
<!-- Filter -->
|
<!-- Filter -->
|
||||||
<string name="filter_media">Filtrar mídia</string>
|
<string name="filter_media">Filtrar mídia</string>
|
||||||
|
|
|
@ -39,7 +39,6 @@
|
||||||
<string name="set_as_default_folder">Utilizar como pasta padrão</string>
|
<string name="set_as_default_folder">Utilizar como pasta padrão</string>
|
||||||
<string name="unset_as_default_folder">Deixar de utilizar como pasta padrão</string>
|
<string name="unset_as_default_folder">Deixar de utilizar como pasta padrão</string>
|
||||||
<string name="reorder_by_dragging">Organizar pasta por arrasto</string>
|
<string name="reorder_by_dragging">Organizar pasta por arrasto</string>
|
||||||
<string name="copy_to_restricted_folder_message">The system does not allow copying to this folder.</string>
|
|
||||||
|
|
||||||
<!-- Filter -->
|
<!-- Filter -->
|
||||||
<string name="filter_media">Filtrar multimédia</string>
|
<string name="filter_media">Filtrar multimédia</string>
|
||||||
|
|
|
@ -33,7 +33,6 @@
|
||||||
<string name="set_as_default_folder">Setază ca dosar implicit</string>
|
<string name="set_as_default_folder">Setază ca dosar implicit</string>
|
||||||
<string name="unset_as_default_folder">Dezactivează ca dosar implicit</string>
|
<string name="unset_as_default_folder">Dezactivează ca dosar implicit</string>
|
||||||
<string name="reorder_by_dragging">Reordonează dosarele prin tragere</string>
|
<string name="reorder_by_dragging">Reordonează dosarele prin tragere</string>
|
||||||
<string name="copy_to_restricted_folder_message">Sistemul nu permite copierea în acest dosar.</string>
|
|
||||||
<!-- Filter -->
|
<!-- Filter -->
|
||||||
<string name="filter_media">Filtrează elementele media</string>
|
<string name="filter_media">Filtrează elementele media</string>
|
||||||
<string name="images">Imagini</string>
|
<string name="images">Imagini</string>
|
||||||
|
|
|
@ -33,7 +33,6 @@
|
||||||
<string name="set_as_default_folder">Set as default folder</string>
|
<string name="set_as_default_folder">Set as default folder</string>
|
||||||
<string name="unset_as_default_folder">Unset as default folder</string>
|
<string name="unset_as_default_folder">Unset as default folder</string>
|
||||||
<string name="reorder_by_dragging">Reorder folders by dragging</string>
|
<string name="reorder_by_dragging">Reorder folders by dragging</string>
|
||||||
<string name="copy_to_restricted_folder_message">The system does not allow copying to this folder.</string>
|
|
||||||
|
|
||||||
<!-- Filter -->
|
<!-- Filter -->
|
||||||
<string name="filter_media">Filtriranje datotek</string>
|
<string name="filter_media">Filtriranje datotek</string>
|
||||||
|
|
|
@ -33,7 +33,6 @@
|
||||||
<string name="set_as_default_folder">Set as default folder</string>
|
<string name="set_as_default_folder">Set as default folder</string>
|
||||||
<string name="unset_as_default_folder">Unset as default folder</string>
|
<string name="unset_as_default_folder">Unset as default folder</string>
|
||||||
<string name="reorder_by_dragging">Reorder folders by dragging</string>
|
<string name="reorder_by_dragging">Reorder folders by dragging</string>
|
||||||
<string name="copy_to_restricted_folder_message">The system does not allow copying to this folder.</string>
|
|
||||||
|
|
||||||
<!-- Filter -->
|
<!-- Filter -->
|
||||||
<string name="filter_media">Филтрирај медију</string>
|
<string name="filter_media">Филтрирај медију</string>
|
||||||
|
|
|
@ -33,7 +33,6 @@
|
||||||
<string name="set_as_default_folder">Set as default folder</string>
|
<string name="set_as_default_folder">Set as default folder</string>
|
||||||
<string name="unset_as_default_folder">Unset as default folder</string>
|
<string name="unset_as_default_folder">Unset as default folder</string>
|
||||||
<string name="reorder_by_dragging">Reorder folders by dragging</string>
|
<string name="reorder_by_dragging">Reorder folders by dragging</string>
|
||||||
<string name="copy_to_restricted_folder_message">The system does not allow copying to this folder.</string>
|
|
||||||
<!-- Filter -->
|
<!-- Filter -->
|
||||||
<string name="filter_media">Filtrera media</string>
|
<string name="filter_media">Filtrera media</string>
|
||||||
<string name="images">Bilder</string>
|
<string name="images">Bilder</string>
|
||||||
|
|
|
@ -39,7 +39,6 @@
|
||||||
<string name="set_as_default_folder">இயல்புநிலை அடைவாக அமை</string>
|
<string name="set_as_default_folder">இயல்புநிலை அடைவாக அமை</string>
|
||||||
<string name="unset_as_default_folder">இயல்புநிலை அடைவாக அமைக்காதே</string>
|
<string name="unset_as_default_folder">இயல்புநிலை அடைவாக அமைக்காதே</string>
|
||||||
<string name="reorder_by_dragging">பிடித்திழுத்து அடைவுகளை மறுசீரமை</string>
|
<string name="reorder_by_dragging">பிடித்திழுத்து அடைவுகளை மறுசீரமை</string>
|
||||||
<string name="copy_to_restricted_folder_message">The system does not allow copying to this folder.</string>
|
|
||||||
<!-- Filter -->
|
<!-- Filter -->
|
||||||
<string name="filter_media">ஊடகத்தை வடிகட்டு</string>
|
<string name="filter_media">ஊடகத்தை வடிகட்டு</string>
|
||||||
<string name="images">படங்கள்</string>
|
<string name="images">படங்கள்</string>
|
||||||
|
|
|
@ -33,7 +33,6 @@
|
||||||
<string name="set_as_default_folder">Встановити теку за замовчуванням</string>
|
<string name="set_as_default_folder">Встановити теку за замовчуванням</string>
|
||||||
<string name="unset_as_default_folder">Відмінити встановлення теки за замовчуванням</string>
|
<string name="unset_as_default_folder">Відмінити встановлення теки за замовчуванням</string>
|
||||||
<string name="reorder_by_dragging">Сортувати папки шляхом переміщення</string>
|
<string name="reorder_by_dragging">Сортувати папки шляхом переміщення</string>
|
||||||
<string name="copy_to_restricted_folder_message">The system does not allow copying to this folder.</string>
|
|
||||||
|
|
||||||
<!-- Filter -->
|
<!-- Filter -->
|
||||||
<string name="filter_media">Фільтр мультимедійних файлів</string>
|
<string name="filter_media">Фільтр мультимедійних файлів</string>
|
||||||
|
|
|
@ -33,7 +33,6 @@
|
||||||
<string name="set_as_default_folder">Set as default folder</string>
|
<string name="set_as_default_folder">Set as default folder</string>
|
||||||
<string name="unset_as_default_folder">Unset as default folder</string>
|
<string name="unset_as_default_folder">Unset as default folder</string>
|
||||||
<string name="reorder_by_dragging">Reorder folders by dragging</string>
|
<string name="reorder_by_dragging">Reorder folders by dragging</string>
|
||||||
<string name="copy_to_restricted_folder_message">The system does not allow copying to this folder.</string>
|
|
||||||
|
|
||||||
<!-- Filter -->
|
<!-- Filter -->
|
||||||
<string name="filter_media">Lọc</string>
|
<string name="filter_media">Lọc</string>
|
||||||
|
|
|
@ -33,7 +33,6 @@
|
||||||
<string name="set_as_default_folder">Set as default folder</string>
|
<string name="set_as_default_folder">Set as default folder</string>
|
||||||
<string name="unset_as_default_folder">Unset as default folder</string>
|
<string name="unset_as_default_folder">Unset as default folder</string>
|
||||||
<string name="reorder_by_dragging">Reorder folders by dragging</string>
|
<string name="reorder_by_dragging">Reorder folders by dragging</string>
|
||||||
<string name="copy_to_restricted_folder_message">The system does not allow copying to this folder.</string>
|
|
||||||
|
|
||||||
<!-- Filter -->
|
<!-- Filter -->
|
||||||
<string name="filter_media">篩選媒體檔案</string>
|
<string name="filter_media">篩選媒體檔案</string>
|
||||||
|
|
|
@ -33,7 +33,6 @@
|
||||||
<string name="set_as_default_folder">Set as default folder</string>
|
<string name="set_as_default_folder">Set as default folder</string>
|
||||||
<string name="unset_as_default_folder">Unset as default folder</string>
|
<string name="unset_as_default_folder">Unset as default folder</string>
|
||||||
<string name="reorder_by_dragging">Reorder folders by dragging</string>
|
<string name="reorder_by_dragging">Reorder folders by dragging</string>
|
||||||
<string name="copy_to_restricted_folder_message">The system does not allow copying to this folder.</string>
|
|
||||||
|
|
||||||
<!-- Filter -->
|
<!-- Filter -->
|
||||||
<string name="filter_media">Filter media</string>
|
<string name="filter_media">Filter media</string>
|
||||||
|
|
|
@ -13,6 +13,7 @@ import com.simplemobiletools.commons.helpers.PERMISSION_WRITE_STORAGE
|
||||||
import com.simplemobiletools.commons.helpers.REAL_FILE_PATH
|
import com.simplemobiletools.commons.helpers.REAL_FILE_PATH
|
||||||
import com.simplemobiletools.commons.helpers.ensureBackgroundThread
|
import com.simplemobiletools.commons.helpers.ensureBackgroundThread
|
||||||
import com.simplemobiletools.commons.helpers.isNougatPlus
|
import com.simplemobiletools.commons.helpers.isNougatPlus
|
||||||
|
import com.simplemobiletools.commons.helpers.isRPlus
|
||||||
import com.simplemobiletools.commons.models.FileDirItem
|
import com.simplemobiletools.commons.models.FileDirItem
|
||||||
import com.simplemobiletools.gallery.pro.R
|
import com.simplemobiletools.gallery.pro.R
|
||||||
import com.simplemobiletools.gallery.pro.dialogs.SaveAsDialog
|
import com.simplemobiletools.gallery.pro.dialogs.SaveAsDialog
|
||||||
|
@ -207,7 +208,7 @@ class NewPhotoEditActivity : SimpleActivity() {
|
||||||
|
|
||||||
// In case the user wants to overwrite the original file and it is on an SD card, delete it manually first. Else the system just appends (1)
|
// In case the user wants to overwrite the original file and it is on an SD card, delete it manually first. Else the system just appends (1)
|
||||||
private fun handleFileOverwriting(path: String, callback: () -> Unit) {
|
private fun handleFileOverwriting(path: String, callback: () -> Unit) {
|
||||||
if (getDoesFilePathExist(path) && isPathOnSD(path)) {
|
if (!isRPlus() && getDoesFilePathExist(path) && isPathOnSD(path)) {
|
||||||
val fileDirItem = FileDirItem(path, path.getFilenameFromPath())
|
val fileDirItem = FileDirItem(path, path.getFilenameFromPath())
|
||||||
tryDeleteFileDirItem(fileDirItem, false, true) { success ->
|
tryDeleteFileDirItem(fileDirItem, false, true) { success ->
|
||||||
if (success) {
|
if (success) {
|
||||||
|
|
|
@ -13,6 +13,7 @@ import com.simplemobiletools.commons.helpers.PERMISSION_WRITE_STORAGE
|
||||||
import com.simplemobiletools.commons.helpers.REAL_FILE_PATH
|
import com.simplemobiletools.commons.helpers.REAL_FILE_PATH
|
||||||
import com.simplemobiletools.commons.helpers.ensureBackgroundThread
|
import com.simplemobiletools.commons.helpers.ensureBackgroundThread
|
||||||
import com.simplemobiletools.commons.helpers.isNougatPlus
|
import com.simplemobiletools.commons.helpers.isNougatPlus
|
||||||
|
import com.simplemobiletools.commons.helpers.isRPlus
|
||||||
import com.simplemobiletools.commons.models.FileDirItem
|
import com.simplemobiletools.commons.models.FileDirItem
|
||||||
import com.simplemobiletools.gallery.pro.R
|
import com.simplemobiletools.gallery.pro.R
|
||||||
import com.simplemobiletools.gallery.pro.dialogs.SaveAsDialog
|
import com.simplemobiletools.gallery.pro.dialogs.SaveAsDialog
|
||||||
|
@ -198,7 +199,7 @@ class NewVideoEditActivity : SimpleActivity() {
|
||||||
|
|
||||||
// In case the user wants to overwrite the original file and it is on an SD card, delete it manually first. Else the system just appends (1)
|
// In case the user wants to overwrite the original file and it is on an SD card, delete it manually first. Else the system just appends (1)
|
||||||
private fun handleFileOverwriting(path: String, callback: () -> Unit) {
|
private fun handleFileOverwriting(path: String, callback: () -> Unit) {
|
||||||
if (getDoesFilePathExist(path) && isPathOnSD(path)) {
|
if (!isRPlus() && getDoesFilePathExist(path) && isPathOnSD(path)) {
|
||||||
val fileDirItem = FileDirItem(path, path.getFilenameFromPath())
|
val fileDirItem = FileDirItem(path, path.getFilenameFromPath())
|
||||||
tryDeleteFileDirItem(fileDirItem, false, true) { success ->
|
tryDeleteFileDirItem(fileDirItem, false, true) { success ->
|
||||||
if (success) {
|
if (success) {
|
||||||
|
|
Loading…
Reference in a new issue