From 556a775848dc612979649e01720daecb760e264e Mon Sep 17 00:00:00 2001 From: tibbi Date: Mon, 4 Nov 2019 22:22:39 +0100 Subject: [PATCH 01/10] adding some OTG file related improvements --- app/build.gradle | 2 +- .../gallery/pro/activities/MainActivity.kt | 33 ++++---- .../gallery/pro/activities/MediaActivity.kt | 4 +- .../pro/activities/PhotoVideoActivity.kt | 6 +- .../pro/activities/ViewPagerActivity.kt | 4 +- .../gallery/pro/adapters/MediaAdapter.kt | 7 +- .../gallery/pro/dialogs/SaveAsDialog.kt | 3 +- .../gallery/pro/extensions/Activity.kt | 12 +-- .../gallery/pro/extensions/Context.kt | 24 ++++-- .../gallery/pro/fragments/PhotoFragment.kt | 10 +-- .../pro/fragments/ViewPagerFragment.kt | 4 +- .../gallery/pro/helpers/MediaFetcher.kt | 84 ++++++++++++++++++- 12 files changed, 142 insertions(+), 51 deletions(-) diff --git a/app/build.gradle b/app/build.gradle index 1a369425d..9819a6131 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -62,7 +62,7 @@ android { } dependencies { - implementation 'com.simplemobiletools:commons:5.18.14' + implementation 'com.simplemobiletools:commons:5.18.26' implementation 'com.theartofdev.edmodo:android-image-cropper:2.8.0' implementation 'androidx.multidex:multidex:2.0.1' implementation 'it.sephiroth.android.exif:library:1.0.1' diff --git a/app/src/main/kotlin/com/simplemobiletools/gallery/pro/activities/MainActivity.kt b/app/src/main/kotlin/com/simplemobiletools/gallery/pro/activities/MainActivity.kt index cf92d6430..df273bec1 100644 --- a/app/src/main/kotlin/com/simplemobiletools/gallery/pro/activities/MainActivity.kt +++ b/app/src/main/kotlin/com/simplemobiletools/gallery/pro/activities/MainActivity.kt @@ -389,10 +389,10 @@ class MainActivity : SimpleActivity(), DirectoryOperationsListener { private fun removeTempFolder() { if (config.tempFolderPath.isNotEmpty()) { val newFolder = File(config.tempFolderPath) - if (newFolder.exists() && newFolder.isDirectory) { + if (getDoesFilePathExist(newFolder.absolutePath) && newFolder.isDirectory) { if (newFolder.list()?.isEmpty() == true && newFolder.getProperSize(true) == 0L && newFolder.getFileCount(true) == 0) { toast(String.format(getString(R.string.deleting_folder), config.tempFolderPath), Toast.LENGTH_LONG) - tryDeleteFileDirItem(newFolder.toFileDirItem(), true, true) + tryDeleteFileDirItem(newFolder.toFileDirItem(applicationContext), true, true) } } config.tempFolderPath = "" @@ -408,16 +408,6 @@ class MainActivity : SimpleActivity(), DirectoryOperationsListener { config.OTGPath = otgPath config.addIncludedFolder(otgPath) } - - // OTG handling has been changed again in SDK version 28, the old method no longer works - /*if (config.OTGPath.isEmpty()) { - runOnUiThread { - ConfirmationDialog(this, getString(R.string.usb_detected), positive = R.string.ok, negative = 0) { - config.wasOTGHandled = true - showOTGPermissionDialog() - } - } - }*/ } } } @@ -428,8 +418,9 @@ class MainActivity : SimpleActivity(), DirectoryOperationsListener { "/storage/emulated/0/Android/data/com.facebook.orca/files/stickers" ) + val OTGPath = config.OTGPath spamFolders.forEach { - if (File(it).exists()) { + if (getDoesFilePathExist(it, OTGPath)) { config.addExcludedFolder(it) } } @@ -570,7 +561,7 @@ class MainActivity : SimpleActivity(), DirectoryOperationsListener { (it.isGif() && filter and TYPE_GIFS != 0) || (it.isRawFast() && filter and TYPE_RAWS != 0) || (it.isSvg() && filter and TYPE_SVGS != 0)) - }?.mapTo(itemsToDelete) { it.toFileDirItem() } + }?.mapTo(itemsToDelete) { it.toFileDirItem(applicationContext) } } if (config.useRecycleBin) { @@ -590,13 +581,14 @@ class MainActivity : SimpleActivity(), DirectoryOperationsListener { } private fun deleteFilteredFileDirItems(fileDirItems: ArrayList, folders: ArrayList) { + val OTGPath = config.OTGPath deleteFiles(fileDirItems) { runOnUiThread { refreshItems() } ensureBackgroundThread { - folders.filter { !it.exists() }.forEach { + folders.filter { !getDoesFilePathExist(it.absolutePath, OTGPath) }.forEach { mDirectoryDao.deleteDirPath(it.absolutePath) } } @@ -1115,13 +1107,14 @@ class MainActivity : SimpleActivity(), DirectoryOperationsListener { private fun checkInvalidDirectories(dirs: ArrayList) { val invalidDirs = ArrayList() + val OTGPath = config.OTGPath dirs.filter { !it.areFavorites() && !it.isRecycleBin() }.forEach { - if (!File(it.path).exists()) { + if (!getDoesFilePathExist(it.path, OTGPath)) { invalidDirs.add(it) } else if (it.path != config.tempFolderPath) { - val children = File(it.path).listFiles()?.asList() + val children = if (isPathOnOTG(it.path)) getOTGFolderChildrenNames(it.path) else File(it.path).list()?.asList() val hasMediaFile = children?.any { - it?.isMediaFile() == true || (it.isDirectory && it.name.startsWith("img_", true)) + it?.isMediaFile() == true || (File(it).isDirectory && it?.startsWith("img_", true) == true) } ?: false if (!hasMediaFile) { @@ -1151,6 +1144,7 @@ class MainActivity : SimpleActivity(), DirectoryOperationsListener { dirs.removeAll(invalidDirs) setupAdapter(dirs) invalidDirs.forEach { + toast("invalid ${it.path}", Toast.LENGTH_LONG) try { mDirectoryDao.deleteDirPath(it.path) } catch (ignored: Exception) { @@ -1243,9 +1237,10 @@ class MainActivity : SimpleActivity(), DirectoryOperationsListener { } oftenRepeatedPaths.removeAll(substringToRemove) + val OTGPath = config.OTGPath oftenRepeatedPaths.forEach { val file = File("$internalPath/$it") - if (file.exists()) { + if (getDoesFilePathExist(file.absolutePath, OTGPath)) { config.addExcludedFolder(file.absolutePath) } } diff --git a/app/src/main/kotlin/com/simplemobiletools/gallery/pro/activities/MediaActivity.kt b/app/src/main/kotlin/com/simplemobiletools/gallery/pro/activities/MediaActivity.kt index 049bdd2d5..365307e86 100644 --- a/app/src/main/kotlin/com/simplemobiletools/gallery/pro/activities/MediaActivity.kt +++ b/app/src/main/kotlin/com/simplemobiletools/gallery/pro/activities/MediaActivity.kt @@ -569,7 +569,7 @@ class MediaActivity : SimpleActivity(), MediaOperationsListener { private fun deleteDirectoryIfEmpty() { val fileDirItem = FileDirItem(mPath, mPath.getFilenameFromPath(), true) - if (config.deleteEmptyFolders && !fileDirItem.isDownloadsFolder() && fileDirItem.isDirectory && fileDirItem.getProperFileCount(true) == 0) { + if (config.deleteEmptyFolders && !fileDirItem.isDownloadsFolder() && fileDirItem.isDirectory && fileDirItem.getProperFileCount(this, true) == 0) { tryDeleteFileDirItem(fileDirItem, true, true) } } @@ -606,7 +606,7 @@ class MediaActivity : SimpleActivity(), MediaOperationsListener { val newMedia = it try { gotMedia(newMedia, false) - oldMedia.filter { !newMedia.contains(it) }.mapNotNull { it as? Medium }.filter { !File(it.path).exists() }.forEach { + oldMedia.filter { !newMedia.contains(it) }.mapNotNull { it as? Medium }.filter { !getDoesFilePathExist(it.path) }.forEach { mMediumDao.deleteMediumPath(it.path) } } catch (e: Exception) { diff --git a/app/src/main/kotlin/com/simplemobiletools/gallery/pro/activities/PhotoVideoActivity.kt b/app/src/main/kotlin/com/simplemobiletools/gallery/pro/activities/PhotoVideoActivity.kt index 6e8072571..409dbdd35 100644 --- a/app/src/main/kotlin/com/simplemobiletools/gallery/pro/activities/PhotoVideoActivity.kt +++ b/app/src/main/kotlin/com/simplemobiletools/gallery/pro/activities/PhotoVideoActivity.kt @@ -75,7 +75,7 @@ open class PhotoVideoActivity : SimpleActivity(), ViewPagerFragment.FragmentList val uri = mUri.toString() if (uri.startsWith("content:/") && uri.contains("/storage/")) { val guessedPath = uri.substring(uri.indexOf("/storage/")) - if (File(guessedPath).exists()) { + if (getDoesFilePathExist(guessedPath)) { val extras = intent.extras ?: Bundle() extras.apply { putString(REAL_FILE_PATH, guessedPath) @@ -93,7 +93,7 @@ open class PhotoVideoActivity : SimpleActivity(), ViewPagerFragment.FragmentList if (intent.extras?.containsKey(REAL_FILE_PATH) == true) { val realPath = intent.extras!!.getString(REAL_FILE_PATH) - if (realPath != null && File(realPath).exists()) { + if (realPath != null && getDoesFilePathExist(realPath)) { if (realPath.getFilenameFromPath().contains('.') || filename.contains('.')) { if (isFileTypeVisible(realPath)) { bottom_actions.beGone() @@ -125,7 +125,7 @@ open class PhotoVideoActivity : SimpleActivity(), ViewPagerFragment.FragmentList return } else { val path = applicationContext.getRealPathFromURI(mUri!!) ?: "" - if (path != mUri.toString() && path.isNotEmpty() && mUri!!.authority != "mms" && filename.contains('.') && File(path).exists()) { + if (path != mUri.toString() && path.isNotEmpty() && mUri!!.authority != "mms" && filename.contains('.') && getDoesFilePathExist(path)) { if (isFileTypeVisible(path)) { bottom_actions.beGone() handleLockedFolderOpening(path.getParentPath()) { success -> diff --git a/app/src/main/kotlin/com/simplemobiletools/gallery/pro/activities/ViewPagerActivity.kt b/app/src/main/kotlin/com/simplemobiletools/gallery/pro/activities/ViewPagerActivity.kt index 8a1029464..cbcc9e4e4 100644 --- a/app/src/main/kotlin/com/simplemobiletools/gallery/pro/activities/ViewPagerActivity.kt +++ b/app/src/main/kotlin/com/simplemobiletools/gallery/pro/activities/ViewPagerActivity.kt @@ -278,7 +278,7 @@ class ViewPagerActivity : SimpleActivity(), ViewPager.OnPageChangeListener, View return } - if (!File(mPath).exists() && getPortraitPath() == "") { + if (!getDoesFilePathExist(mPath) && getPortraitPath() == "") { finish() return } @@ -1066,7 +1066,7 @@ class ViewPagerActivity : SimpleActivity(), ViewPager.OnPageChangeListener, View private fun deleteDirectoryIfEmpty() { val fileDirItem = FileDirItem(mDirectory, mDirectory.getFilenameFromPath(), File(mDirectory).isDirectory) - if (config.deleteEmptyFolders && !fileDirItem.isDownloadsFolder() && fileDirItem.isDirectory && fileDirItem.getProperFileCount(true) == 0) { + if (config.deleteEmptyFolders && !fileDirItem.isDownloadsFolder() && fileDirItem.isDirectory && fileDirItem.getProperFileCount(this, true) == 0) { tryDeleteFileDirItem(fileDirItem, true, true) scanPathRecursively(mDirectory) } diff --git a/app/src/main/kotlin/com/simplemobiletools/gallery/pro/adapters/MediaAdapter.kt b/app/src/main/kotlin/com/simplemobiletools/gallery/pro/adapters/MediaAdapter.kt index 0b609842c..00e70c147 100644 --- a/app/src/main/kotlin/com/simplemobiletools/gallery/pro/adapters/MediaAdapter.kt +++ b/app/src/main/kotlin/com/simplemobiletools/gallery/pro/adapters/MediaAdapter.kt @@ -49,6 +49,7 @@ class MediaAdapter(activity: BaseSimpleActivity, var media: MutableList Unit) { @@ -67,7 +66,7 @@ class SaveAsDialog(val activity: BaseSimpleActivity, val path: String, val appen return@setOnClickListener } - if (File(newPath).exists()) { + if (activity.getDoesFilePathExist(newPath)) { val title = String.format(activity.getString(R.string.file_already_exists_overwrite), newFilename) ConfirmationDialog(activity, title) { callback(newPath) diff --git a/app/src/main/kotlin/com/simplemobiletools/gallery/pro/extensions/Activity.kt b/app/src/main/kotlin/com/simplemobiletools/gallery/pro/extensions/Activity.kt index 34f617e6e..9b3faf538 100644 --- a/app/src/main/kotlin/com/simplemobiletools/gallery/pro/extensions/Activity.kt +++ b/app/src/main/kotlin/com/simplemobiletools/gallery/pro/extensions/Activity.kt @@ -131,7 +131,7 @@ fun AppCompatActivity.hideSystemUI(toggleActionBarVisibility: Boolean) { fun BaseSimpleActivity.addNoMedia(path: String, callback: () -> Unit) { val file = File(path, NOMEDIA) - if (file.exists()) { + if (getDoesFilePathExist(file.absolutePath)) { callback() return } @@ -164,12 +164,12 @@ fun BaseSimpleActivity.addNoMedia(path: String, callback: () -> Unit) { fun BaseSimpleActivity.removeNoMedia(path: String, callback: (() -> Unit)? = null) { val file = File(path, NOMEDIA) - if (!file.exists()) { + if (!getDoesFilePathExist(file.absolutePath)) { callback?.invoke() return } - tryDeleteFileDirItem(file.toFileDirItem(), false, false) { + tryDeleteFileDirItem(file.toFileDirItem(applicationContext), false, false) { callback?.invoke() } } @@ -271,7 +271,7 @@ fun BaseSimpleActivity.restoreRecycleBinPaths(paths: ArrayList, mediumDa try { out = getFileOutputStreamSync(destination, source.getMimeType()) inputStream = getFileInputStreamSync(source) - inputStream.copyTo(out!!) + inputStream!!.copyTo(out!!) if (File(source).length() == File(destination).length()) { mediumDao.updateDeleted(destination.removePrefix(recycleBinPath), 0, "$RECYCLE_BIN$destination") } @@ -519,7 +519,9 @@ fun BaseSimpleActivity.copyFile(source: String, destination: String) { try { out = getFileOutputStreamSync(destination, source.getMimeType()) inputStream = getFileInputStreamSync(source) - inputStream.copyTo(out!!) + inputStream!!.copyTo(out!!) + } catch (e: Exception) { + showErrorToast(e) } finally { inputStream?.close() out?.close() diff --git a/app/src/main/kotlin/com/simplemobiletools/gallery/pro/extensions/Context.kt b/app/src/main/kotlin/com/simplemobiletools/gallery/pro/extensions/Context.kt index e43800976..be514de6c 100644 --- a/app/src/main/kotlin/com/simplemobiletools/gallery/pro/extensions/Context.kt +++ b/app/src/main/kotlin/com/simplemobiletools/gallery/pro/extensions/Context.kt @@ -366,6 +366,7 @@ fun Context.getNoMediaFolders(callback: (folders: ArrayList) -> Unit) { val selection = "${MediaStore.Files.FileColumns.MEDIA_TYPE} = ? AND ${MediaStore.Files.FileColumns.TITLE} LIKE ?" val selectionArgs = arrayOf(MediaStore.Files.FileColumns.MEDIA_TYPE_NONE.toString(), "%$NOMEDIA%") val sortOrder = "${MediaStore.Files.FileColumns.DATE_MODIFIED} DESC" + val OTGPath = config.OTGPath var cursor: Cursor? = null try { @@ -374,7 +375,7 @@ fun Context.getNoMediaFolders(callback: (folders: ArrayList) -> Unit) { do { val path = cursor.getStringValue(MediaStore.Files.FileColumns.DATA) ?: continue val noMediaFile = File(path) - if (noMediaFile.exists() && noMediaFile.name == NOMEDIA) { + if (getDoesFilePathExist(noMediaFile.absolutePath, OTGPath) && noMediaFile.name == NOMEDIA) { folders.add("${noMediaFile.parent}/") } } while (cursor.moveToNext()) @@ -661,9 +662,10 @@ fun Context.getCachedMedia(path: String, getVideosOnly: Boolean = false, getImag mediaFetcher.sortMedia(media, config.getFileSorting(pathToUse)) val grouped = mediaFetcher.groupMedia(media, pathToUse) callback(grouped.clone() as ArrayList) + val OTGPath = config.OTGPath val mediaToDelete = ArrayList() - media.filter { !File(it.path).exists() }.forEach { + media.filter { !getDoesFilePathExist(it.path, OTGPath) }.forEach { if (it.path.startsWith(recycleBinPath)) { deleteDBPath(mediumDao, it.path) } else { @@ -682,7 +684,8 @@ fun Context.getCachedMedia(path: String, getVideosOnly: Boolean = false, getImag fun Context.removeInvalidDBDirectories(dirs: ArrayList? = null, directoryDao: DirectoryDao = galleryDB.DirectoryDao()) { val dirsToCheck = dirs ?: directoryDao.getAll() - dirsToCheck.filter { !it.areFavorites() && !it.isRecycleBin() && !File(it.path).exists() && it.path != config.tempFolderPath }.forEach { + val OTGPath = config.OTGPath + dirsToCheck.filter { !it.areFavorites() && !it.isRecycleBin() && !getDoesFilePathExist(it.path, OTGPath) && it.path != config.tempFolderPath }.forEach { try { directoryDao.deleteDirPath(it.path) } catch (ignored: Exception) { @@ -706,6 +709,10 @@ fun Context.updateDBDirectory(directory: Directory, directoryDao: DirectoryDao) } } +fun Context.getOTGFolderChildren(path: String) = getDocumentFile(path)?.listFiles() + +fun Context.getOTGFolderChildrenNames(path: String) = getOTGFolderChildren(path)?.map { it.name }?.toMutableList() + fun Context.getFavoritePaths(): ArrayList { return try { galleryDB.MediumDao().getFavoritePaths() as ArrayList @@ -805,7 +812,7 @@ fun Context.parseFileChannel(path: String, fc: FileChannel, level: Int, start: L fun Context.addPathToDB(path: String) { ensureBackgroundThread { - if (!File(path).exists()) { + if (!getDoesFilePathExist(path)) { return@ensureBackgroundThread } @@ -833,13 +840,18 @@ fun Context.addPathToDB(path: String) { fun Context.createDirectoryFromMedia(path: String, curMedia: ArrayList, albumCovers: ArrayList, hiddenString: String, includedFolders: MutableSet, isSortingAscending: Boolean, getProperFileSize: Boolean): Directory { - var thumbnail = curMedia.firstOrNull { File(it.path).exists() }?.path ?: "" + val OTGPath = config.OTGPath + var thumbnail = curMedia.firstOrNull { getDoesFilePathExist(it.path, OTGPath) }?.path ?: "" albumCovers.forEach { - if (it.path == path && File(it.tmb).exists()) { + if (it.path == path && getDoesFilePathExist(it.tmb, OTGPath)) { thumbnail = it.tmb } } + if (config.OTGPath.isNotEmpty() && thumbnail.startsWith(config.OTGPath)) { + thumbnail = thumbnail.getOTGPublicPath(applicationContext) + } + val defaultMedium = Medium(0, "", "", "", 0L, 0L, 0L, 0, 0, false, 0L) val firstItem = curMedia.firstOrNull() ?: defaultMedium val lastItem = curMedia.lastOrNull() ?: defaultMedium diff --git a/app/src/main/kotlin/com/simplemobiletools/gallery/pro/fragments/PhotoFragment.kt b/app/src/main/kotlin/com/simplemobiletools/gallery/pro/fragments/PhotoFragment.kt index c0eb24494..d811a6b23 100644 --- a/app/src/main/kotlin/com/simplemobiletools/gallery/pro/fragments/PhotoFragment.kt +++ b/app/src/main/kotlin/com/simplemobiletools/gallery/pro/fragments/PhotoFragment.kt @@ -357,11 +357,11 @@ class PhotoFragment : ViewPagerFragment() { private fun loadGif() { try { - val path = mMedium.path - val source = if (path.startsWith("content://") || path.startsWith("file://")) { - InputSource.UriSource(context!!.contentResolver, Uri.parse(path)) + val pathToLoad = getPathToLoad(mMedium) + val source = if (pathToLoad.startsWith("content://") || pathToLoad.startsWith("file://")) { + InputSource.UriSource(context!!.contentResolver, Uri.parse(pathToLoad)) } else { - InputSource.FileSource(path) + InputSource.FileSource(pathToLoad) } mView.apply { @@ -559,7 +559,7 @@ class PhotoFragment : ViewPagerFragment() { } } - private fun getFilePathToShow() = if (mMedium.isPortrait()) mCurrentPortraitPhotoPath else mMedium.path + private fun getFilePathToShow() = if (mMedium.isPortrait()) mCurrentPortraitPhotoPath else getPathToLoad(mMedium) private fun openPanorama() { Intent(context, PanoramaPhotoActivity::class.java).apply { diff --git a/app/src/main/kotlin/com/simplemobiletools/gallery/pro/fragments/ViewPagerFragment.kt b/app/src/main/kotlin/com/simplemobiletools/gallery/pro/fragments/ViewPagerFragment.kt index 885af7016..fd350941c 100644 --- a/app/src/main/kotlin/com/simplemobiletools/gallery/pro/fragments/ViewPagerFragment.kt +++ b/app/src/main/kotlin/com/simplemobiletools/gallery/pro/fragments/ViewPagerFragment.kt @@ -35,7 +35,7 @@ abstract class ViewPagerFragment : Fragment() { fun getMediumExtendedDetails(medium: Medium): String { val file = File(medium.path) - if (!file.exists()) { + if (context?.getDoesFilePathExist(file.absolutePath) == false) { return "" } @@ -81,6 +81,8 @@ abstract class ViewPagerFragment : Fragment() { return details.toString().trim() } + fun getPathToLoad(medium: Medium) = if (context!!.isPathOnOTG(medium.path)) medium.path.getOTGPublicPath(context!!) else medium.path + private fun getFileLastModified(file: File): String { val projection = arrayOf(MediaStore.Images.Media.DATE_MODIFIED) val uri = MediaStore.Files.getContentUri("external") diff --git a/app/src/main/kotlin/com/simplemobiletools/gallery/pro/helpers/MediaFetcher.kt b/app/src/main/kotlin/com/simplemobiletools/gallery/pro/helpers/MediaFetcher.kt index 682ecd1ae..a17eabeea 100644 --- a/app/src/main/kotlin/com/simplemobiletools/gallery/pro/helpers/MediaFetcher.kt +++ b/app/src/main/kotlin/com/simplemobiletools/gallery/pro/helpers/MediaFetcher.kt @@ -2,6 +2,7 @@ package com.simplemobiletools.gallery.pro.helpers import android.content.Context import android.database.Cursor +import android.net.Uri import android.os.Environment import android.provider.BaseColumns import android.provider.MediaStore @@ -27,8 +28,15 @@ class MediaFetcher(val context: Context) { } val curMedia = ArrayList() - val newMedia = getMediaInFolder(curPath, isPickImage, isPickVideo, filterMedia, getProperDateTaken, getProperFileSize, favoritePaths, getVideoDurations) - curMedia.addAll(newMedia) + if (context.isPathOnOTG(curPath)) { + if (context.hasOTGConnected()) { + val newMedia = getMediaOnOTG(curPath, isPickImage, isPickVideo, filterMedia, favoritePaths, getVideoDurations) + curMedia.addAll(newMedia) + } + } else { + val newMedia = getMediaInFolder(curPath, isPickImage, isPickVideo, filterMedia, getProperDateTaken, getProperFileSize, favoritePaths, getVideoDurations) + curMedia.addAll(newMedia) + } if (sortMedia) { sortMedia(curMedia, context.config.getFileSorting(curPath)) @@ -39,12 +47,13 @@ class MediaFetcher(val context: Context) { fun getFoldersToScan(): ArrayList { return try { + val OTGPath = context.config.OTGPath val folders = getLatestFileFolders() folders.addAll(arrayListOf( Environment.getExternalStoragePublicDirectory(Environment.DIRECTORY_DCIM).toString(), "${Environment.getExternalStoragePublicDirectory(Environment.DIRECTORY_DCIM)}/Camera", Environment.getExternalStoragePublicDirectory(Environment.DIRECTORY_PICTURES).toString() - ).filter { File(it).exists() }) + ).filter { context.getDoesFilePathExist(it, OTGPath) }) val filterMedia = context.config.filterMedia val uri = MediaStore.Files.getContentUri("external") @@ -167,7 +176,8 @@ class MediaFetcher(val context: Context) { val foldersToIgnore = arrayListOf("/storage/emulated/legacy") val config = context.config val includedFolders = config.includedFolders - var foldersToScan = config.everShownFolders.filter { it == FAVORITES || it == RECYCLE_BIN || File(it).exists() }.toMutableList() as ArrayList + val OTGPath = config.OTGPath + var foldersToScan = config.everShownFolders.filter { it == FAVORITES || it == RECYCLE_BIN || context.getDoesFilePathExist(it, OTGPath) }.toMutableList() as ArrayList cursor.use { if (cursor.moveToFirst()) { @@ -327,6 +337,72 @@ class MediaFetcher(val context: Context) { return media } + private fun getMediaOnOTG(folder: String, isPickImage: Boolean, isPickVideo: Boolean, filterMedia: Int, favoritePaths: ArrayList, + getVideoDurations: Boolean): ArrayList { + val media = ArrayList() + val files = context.getDocumentFile(folder)?.listFiles() ?: return media + val checkFileExistence = context.config.fileLoadingPriority == PRIORITY_VALIDITY + val showHidden = context.config.shouldShowHidden + val OTGPath = context.config.OTGPath + + for (file in files) { + if (shouldStop) { + break + } + + val filename = file.name ?: continue + val isImage = filename.isImageFast() + val isVideo = if (isImage) false else filename.isVideoFast() + val isGif = if (isImage || isVideo) false else filename.isGif() + val isRaw = if (isImage || isVideo || isGif) false else filename.isRawFast() + val isSvg = if (isImage || isVideo || isGif || isRaw) false else filename.isSvg() + + if (!isImage && !isVideo && !isGif && !isRaw && !isSvg) + continue + + if (isVideo && (isPickImage || filterMedia and TYPE_VIDEOS == 0)) + continue + + if (isImage && (isPickVideo || filterMedia and TYPE_IMAGES == 0)) + continue + + if (isGif && filterMedia and TYPE_GIFS == 0) + continue + + if (isRaw && filterMedia and TYPE_RAWS == 0) + continue + + if (isSvg && filterMedia and TYPE_SVGS == 0) + continue + + if (!showHidden && filename.startsWith('.')) + continue + + val size = file.length() + if (size <= 0L || (checkFileExistence && !context.getDoesFilePathExist(file.uri.toString(), OTGPath))) + continue + + val dateTaken = file.lastModified() + val dateModified = file.lastModified() + + val type = when { + isVideo -> TYPE_VIDEOS + isGif -> TYPE_GIFS + isRaw -> TYPE_RAWS + isSvg -> TYPE_SVGS + else -> TYPE_IMAGES + } + + val path = Uri.decode(file.uri.toString().replaceFirst("${context.config.OTGTreeUri}/document/${context.config.OTGPartition}%3A", "${context.config.OTGPath}/")) + val videoDuration = if (getVideoDurations) path.getVideoDuration() else 0 + val isFavorite = favoritePaths.contains(path) + val medium = Medium(null, filename, path, folder, dateModified, dateTaken, size, type, videoDuration, isFavorite, 0L) + media.add(medium) + } + + return media + } + private fun getFolderDateTakens(folder: String): HashMap { val projection = arrayOf( MediaStore.Images.Media.DISPLAY_NAME, From 04ecb6e0b4b3ebf356f5acefafd470b7e100159a Mon Sep 17 00:00:00 2001 From: tibbi Date: Mon, 4 Nov 2019 23:36:08 +0100 Subject: [PATCH 02/10] fix moving OTG files in the recycle bin --- .../pro/activities/ViewPagerActivity.kt | 2 +- .../gallery/pro/extensions/Activity.kt | 61 +++++++++++++++---- 2 files changed, 49 insertions(+), 14 deletions(-) diff --git a/app/src/main/kotlin/com/simplemobiletools/gallery/pro/activities/ViewPagerActivity.kt b/app/src/main/kotlin/com/simplemobiletools/gallery/pro/activities/ViewPagerActivity.kt index cbcc9e4e4..f0eec2073 100644 --- a/app/src/main/kotlin/com/simplemobiletools/gallery/pro/activities/ViewPagerActivity.kt +++ b/app/src/main/kotlin/com/simplemobiletools/gallery/pro/activities/ViewPagerActivity.kt @@ -945,7 +945,7 @@ class ViewPagerActivity : SimpleActivity(), ViewPager.OnPageChangeListener, View private fun deleteConfirmed() { val path = getCurrentMedia().getOrNull(mPos)?.path ?: return - if (File(path).isDirectory || !path.isMediaFile()) { + if (getIsPathDirectory(path) || !path.isMediaFile()) { return } diff --git a/app/src/main/kotlin/com/simplemobiletools/gallery/pro/extensions/Activity.kt b/app/src/main/kotlin/com/simplemobiletools/gallery/pro/extensions/Activity.kt index 9b3faf538..0f6db3a75 100644 --- a/app/src/main/kotlin/com/simplemobiletools/gallery/pro/extensions/Activity.kt +++ b/app/src/main/kotlin/com/simplemobiletools/gallery/pro/extensions/Activity.kt @@ -228,22 +228,57 @@ fun BaseSimpleActivity.tryDeleteFileDirItem(fileDirItem: FileDirItem, allowDelet fun BaseSimpleActivity.movePathsInRecycleBin(paths: ArrayList, mediumDao: MediumDao = galleryDB.MediumDao(), callback: ((wasSuccess: Boolean) -> Unit)?) { ensureBackgroundThread { var pathsCnt = paths.size - paths.forEach { - val file = File(it) - val internalFile = File(recycleBinPath, it) - val lastModified = file.lastModified() - try { - if (file.copyRecursively(internalFile, true)) { - mediumDao.updateDeleted("$RECYCLE_BIN$it", System.currentTimeMillis(), it) - pathsCnt-- + val OTGPath = config.OTGPath - if (config.keepLastModified) { - internalFile.setLastModified(lastModified) + for (source in paths) { + if (OTGPath.isNotEmpty() && source.startsWith(OTGPath)) { + var inputStream: InputStream? = null + var out: OutputStream? = null + try { + val destination = "$recycleBinPath/$source" + val fileDocument = getSomeDocumentFile(source) + inputStream = applicationContext.contentResolver.openInputStream(fileDocument?.uri) + out = getFileOutputStreamSync(destination, source.getMimeType()) + + var copiedSize = 0L + val buffer = ByteArray(DEFAULT_BUFFER_SIZE) + var bytes = inputStream.read(buffer) + while (bytes >= 0) { + out!!.write(buffer, 0, bytes) + copiedSize += bytes + bytes = inputStream.read(buffer) } + + out?.flush() + + if (fileDocument?.getItemSize(false) == copiedSize && getDoesFilePathExist(destination)) { + mediumDao.updateDeleted("$RECYCLE_BIN$source", System.currentTimeMillis(), source) + pathsCnt-- + } + } catch (e: Exception) { + showErrorToast(e) + return@ensureBackgroundThread + } finally { + inputStream?.close() + out?.close() + } + } else { + val file = File(source) + val internalFile = File(recycleBinPath, source) + val lastModified = file.lastModified() + try { + if (file.copyRecursively(internalFile, true)) { + mediumDao.updateDeleted("$RECYCLE_BIN$source", System.currentTimeMillis(), source) + pathsCnt-- + + if (config.keepLastModified) { + internalFile.setLastModified(lastModified) + } + } + } catch (e: Exception) { + showErrorToast(e) + return@ensureBackgroundThread } - } catch (e: Exception) { - showErrorToast(e) - return@forEach } } callback?.invoke(pathsCnt == 0) From 1c7fbc19ade7169f7b8175ae9ca6d2977e0fed0a Mon Sep 17 00:00:00 2001 From: tibbi Date: Tue, 5 Nov 2019 00:12:07 +0100 Subject: [PATCH 03/10] adding some OTG file recycle bin related improvements --- app/build.gradle | 2 +- .../gallery/pro/activities/MediaActivity.kt | 2 +- .../gallery/pro/extensions/Activity.kt | 17 ++++++++++++++--- 3 files changed, 16 insertions(+), 5 deletions(-) diff --git a/app/build.gradle b/app/build.gradle index 9819a6131..9bad80a65 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -62,7 +62,7 @@ android { } dependencies { - implementation 'com.simplemobiletools:commons:5.18.26' + implementation 'com.simplemobiletools:commons:5.18.27' implementation 'com.theartofdev.edmodo:android-image-cropper:2.8.0' implementation 'androidx.multidex:multidex:2.0.1' implementation 'it.sephiroth.android.exif:library:1.0.1' diff --git a/app/src/main/kotlin/com/simplemobiletools/gallery/pro/activities/MediaActivity.kt b/app/src/main/kotlin/com/simplemobiletools/gallery/pro/activities/MediaActivity.kt index 365307e86..dc44ff967 100644 --- a/app/src/main/kotlin/com/simplemobiletools/gallery/pro/activities/MediaActivity.kt +++ b/app/src/main/kotlin/com/simplemobiletools/gallery/pro/activities/MediaActivity.kt @@ -891,7 +891,7 @@ class MediaActivity : SimpleActivity(), MediaOperationsListener { } override fun tryDeleteFiles(fileDirItems: ArrayList) { - val filtered = fileDirItems.filter { File(it.path).isFile && it.path.isMediaFile() } as ArrayList + val filtered = fileDirItems.filter { !getIsPathDirectory(it.path) && it.path.isMediaFile() } as ArrayList if (filtered.isEmpty()) { return } diff --git a/app/src/main/kotlin/com/simplemobiletools/gallery/pro/extensions/Activity.kt b/app/src/main/kotlin/com/simplemobiletools/gallery/pro/extensions/Activity.kt index 0f6db3a75..438487891 100644 --- a/app/src/main/kotlin/com/simplemobiletools/gallery/pro/extensions/Activity.kt +++ b/app/src/main/kotlin/com/simplemobiletools/gallery/pro/extensions/Activity.kt @@ -251,7 +251,7 @@ fun BaseSimpleActivity.movePathsInRecycleBin(paths: ArrayList, mediumDao out?.flush() - if (fileDocument?.getItemSize(false) == copiedSize && getDoesFilePathExist(destination)) { + if (fileDocument?.getItemSize(true) == copiedSize && getDoesFilePathExist(destination)) { mediumDao.updateDeleted("$RECYCLE_BIN$source", System.currentTimeMillis(), source) pathsCnt-- } @@ -306,8 +306,19 @@ fun BaseSimpleActivity.restoreRecycleBinPaths(paths: ArrayList, mediumDa try { out = getFileOutputStreamSync(destination, source.getMimeType()) inputStream = getFileInputStreamSync(source) - inputStream!!.copyTo(out!!) - if (File(source).length() == File(destination).length()) { + + var copiedSize = 0L + val buffer = ByteArray(DEFAULT_BUFFER_SIZE) + var bytes = inputStream!!.read(buffer) + while (bytes >= 0) { + out!!.write(buffer, 0, bytes) + copiedSize += bytes + bytes = inputStream.read(buffer) + } + + out?.flush() + + if (File(source).length() == copiedSize) { mediumDao.updateDeleted(destination.removePrefix(recycleBinPath), 0, "$RECYCLE_BIN$destination") } newPaths.add(destination) From ff99d19176ecb56dda2c83038d4a3ccd9792023b Mon Sep 17 00:00:00 2001 From: tibbi Date: Tue, 5 Nov 2019 11:07:31 +0100 Subject: [PATCH 04/10] make exception at Picasso onError image loading nullable --- .../simplemobiletools/gallery/pro/fragments/PhotoFragment.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/src/main/kotlin/com/simplemobiletools/gallery/pro/fragments/PhotoFragment.kt b/app/src/main/kotlin/com/simplemobiletools/gallery/pro/fragments/PhotoFragment.kt index d811a6b23..60d85a7aa 100644 --- a/app/src/main/kotlin/com/simplemobiletools/gallery/pro/fragments/PhotoFragment.kt +++ b/app/src/main/kotlin/com/simplemobiletools/gallery/pro/fragments/PhotoFragment.kt @@ -444,7 +444,7 @@ class PhotoFragment : ViewPagerFragment() { } } - override fun onError(e: Exception) {} + override fun onError(e: Exception?) {} }) } catch (ignored: Exception) { } From 2cb467d50f95fa3e7182877f4354e79c5a4a3437 Mon Sep 17 00:00:00 2001 From: tibbi Date: Tue, 5 Nov 2019 11:11:16 +0100 Subject: [PATCH 05/10] revert constraintlayout back to beta2 to fix a font size glitch --- app/build.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/build.gradle b/app/build.gradle index 9bad80a65..0d6f6ca68 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -67,7 +67,7 @@ dependencies { implementation 'androidx.multidex:multidex:2.0.1' implementation 'it.sephiroth.android.exif:library:1.0.1' implementation 'pl.droidsonroids.gif:android-gif-drawable:1.2.18' - implementation 'androidx.constraintlayout:constraintlayout:2.0.0-beta3' + implementation 'androidx.constraintlayout:constraintlayout:2.0.0-beta2' implementation 'com.google.android.exoplayer:exoplayer-core:2.9.6' implementation 'com.google.vr:sdk-panowidget:1.180.0' implementation 'com.google.vr:sdk-videowidget:1.180.0' From c15b04584ccc9b7440b248d5e606f925843e3aa4 Mon Sep 17 00:00:00 2001 From: tibbi Date: Tue, 5 Nov 2019 11:32:44 +0100 Subject: [PATCH 06/10] update version to 6.10.4 --- app/build.gradle | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/build.gradle b/app/build.gradle index 0d6f6ca68..75621f3ae 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -15,8 +15,8 @@ android { applicationId "com.simplemobiletools.gallery.pro" minSdkVersion 21 targetSdkVersion 28 - versionCode 270 - versionName "6.10.3" + versionCode 271 + versionName "6.10.4" multiDexEnabled true setProperty("archivesBaseName", "gallery") vectorDrawables.useSupportLibrary = true From 9cbf208ed00f4b789f91c1152289c47648f48bb3 Mon Sep 17 00:00:00 2001 From: tibbi Date: Tue, 5 Nov 2019 11:32:50 +0100 Subject: [PATCH 07/10] updating changelog --- CHANGELOG.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 7e8987f3a..1549a634b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,12 @@ Changelog ========== +Version 6.10.4 *(2019-11-05)* +---------------------------- + + * Improved USB device handling + * Some smaller stability and translation improvements + Version 6.10.3 *(2019-10-27)* ---------------------------- From a3611bc508b8d7eac81405b6b3ed2eaa6ba16584 Mon Sep 17 00:00:00 2001 From: tibbi Date: Tue, 5 Nov 2019 19:15:08 +0100 Subject: [PATCH 08/10] updating gradle to 3.5.2 --- build.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.gradle b/build.gradle index 97a4d3f55..d28a976a8 100644 --- a/build.gradle +++ b/build.gradle @@ -9,7 +9,7 @@ buildscript { } dependencies { - classpath 'com.android.tools.build:gradle:3.5.1' + classpath 'com.android.tools.build:gradle:3.5.2' classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" // NOTE: Do not place your application dependencies here; they belong From 1eada20f7336f4d8c0552bb0bdee466bfc999c10 Mon Sep 17 00:00:00 2001 From: tibbi Date: Tue, 5 Nov 2019 19:15:16 +0100 Subject: [PATCH 09/10] updating commons to 5.19.2 --- app/build.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/build.gradle b/app/build.gradle index 75621f3ae..e25c0421a 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -62,7 +62,7 @@ android { } dependencies { - implementation 'com.simplemobiletools:commons:5.18.27' + implementation 'com.simplemobiletools:commons:5.19.2' implementation 'com.theartofdev.edmodo:android-image-cropper:2.8.0' implementation 'androidx.multidex:multidex:2.0.1' implementation 'it.sephiroth.android.exif:library:1.0.1' From 6891c3c2b65b739655ccb6e196bbe38f836ddd84 Mon Sep 17 00:00:00 2001 From: tibbi Date: Sat, 9 Nov 2019 12:54:11 +0100 Subject: [PATCH 10/10] replacing the colon with a dash in the app title --- app/src/main/res/values-ar/strings.xml | 2 +- app/src/main/res/values-az/strings.xml | 2 +- app/src/main/res/values-ca/strings.xml | 2 +- app/src/main/res/values-cs/strings.xml | 2 +- app/src/main/res/values-da/strings.xml | 2 +- app/src/main/res/values-de/strings.xml | 2 +- app/src/main/res/values-el/strings.xml | 2 +- app/src/main/res/values-es/strings.xml | 2 +- app/src/main/res/values-fi/strings.xml | 2 +- app/src/main/res/values-fr/strings.xml | 2 +- app/src/main/res/values-gl/strings.xml | 2 +- app/src/main/res/values-hr/strings.xml | 2 +- app/src/main/res/values-hu/strings.xml | 2 +- app/src/main/res/values-id/strings.xml | 2 +- app/src/main/res/values-in/strings.xml | 2 +- app/src/main/res/values-it/strings.xml | 2 +- app/src/main/res/values-ja/strings.xml | 2 +- app/src/main/res/values-ko-rKR/strings.xml | 2 +- app/src/main/res/values-lt/strings.xml | 2 +- app/src/main/res/values-nb/strings.xml | 2 +- app/src/main/res/values-pl/strings.xml | 2 +- app/src/main/res/values-pt-rBR/strings.xml | 2 +- app/src/main/res/values-pt/strings.xml | 2 +- app/src/main/res/values-ru/strings.xml | 2 +- app/src/main/res/values-sk/strings.xml | 2 +- app/src/main/res/values-sl/strings.xml | 2 +- app/src/main/res/values-sr/strings.xml | 2 +- app/src/main/res/values-sv/strings.xml | 2 +- app/src/main/res/values-tr/strings.xml | 2 +- app/src/main/res/values-uk/strings.xml | 2 +- app/src/main/res/values-zh-rCN/strings.xml | 2 +- app/src/main/res/values-zh-rHK/strings.xml | 2 +- app/src/main/res/values-zh-rTW/strings.xml | 2 +- app/src/main/res/values/strings.xml | 2 +- fastlane/metadata/android/ca/title.txt | 2 +- fastlane/metadata/android/cs/title.txt | 2 +- fastlane/metadata/android/da/title.txt | 2 +- fastlane/metadata/android/de/title.txt | 2 +- fastlane/metadata/android/el/title.txt | 2 +- fastlane/metadata/android/en-US/title.txt | 2 +- fastlane/metadata/android/id/title.txt | 2 +- fastlane/metadata/android/in/title.txt | 2 +- fastlane/metadata/android/it/title.txt | 2 +- fastlane/metadata/android/pl/title.txt | 2 +- fastlane/metadata/android/pt-rBR/title.txt | 2 +- fastlane/metadata/android/pt-rPT/title.txt | 2 +- fastlane/metadata/android/ru/title.txt | 2 +- fastlane/metadata/android/sk/title.txt | 2 +- fastlane/metadata/android/sr/title.txt | 2 +- fastlane/metadata/android/tr/title.txt | 2 +- fastlane/metadata/android/uk/title.txt | 2 +- fastlane/metadata/android/zh-rCN/title.txt | 2 +- fastlane/metadata/android/zh-rHK/title.txt | 2 +- fastlane/metadata/android/zh-rTW/title.txt | 2 +- 54 files changed, 54 insertions(+), 54 deletions(-) diff --git a/app/src/main/res/values-ar/strings.xml b/app/src/main/res/values-ar/strings.xml index 4377694c6..674976caa 100644 --- a/app/src/main/res/values-ar/strings.xml +++ b/app/src/main/res/values-ar/strings.xml @@ -235,7 +235,7 @@ - Simple Gallery Pro: Photo Manager & Editor + Simple Gallery Pro - Photo Manager & Editor Browse your memories without any interruptions. diff --git a/app/src/main/res/values-az/strings.xml b/app/src/main/res/values-az/strings.xml index e05f14fbb..ca3c433b6 100644 --- a/app/src/main/res/values-az/strings.xml +++ b/app/src/main/res/values-az/strings.xml @@ -235,7 +235,7 @@ - Simple Gallery Pro: Photo Manager & Editor + Simple Gallery Pro - Photo Manager & Editor Browse your memories without any interruptions. diff --git a/app/src/main/res/values-ca/strings.xml b/app/src/main/res/values-ca/strings.xml index d909de722..da07babb8 100644 --- a/app/src/main/res/values-ca/strings.xml +++ b/app/src/main/res/values-ca/strings.xml @@ -235,7 +235,7 @@ - Simple Gallery Pro: Photo Manager & Editor + Simple Gallery Pro - Photo Manager & Editor Navegueu pels vostres records sense interrupcions. diff --git a/app/src/main/res/values-cs/strings.xml b/app/src/main/res/values-cs/strings.xml index d58055dfd..35b8641ab 100644 --- a/app/src/main/res/values-cs/strings.xml +++ b/app/src/main/res/values-cs/strings.xml @@ -235,7 +235,7 @@ - Jednoduchá Galerie Pro: Organizér a editor fotografií + Jednoduchá Galerie Pro - Organizér a editor fotografií Browse your memories without any interruptions. diff --git a/app/src/main/res/values-da/strings.xml b/app/src/main/res/values-da/strings.xml index 1835ef628..ef70131fa 100644 --- a/app/src/main/res/values-da/strings.xml +++ b/app/src/main/res/values-da/strings.xml @@ -235,7 +235,7 @@ - Simple Gallery Pro: Billedhåndtering + Simple Gallery Pro - Billedhåndtering Browse your memories without any interruptions. diff --git a/app/src/main/res/values-de/strings.xml b/app/src/main/res/values-de/strings.xml index 8627c4c61..6e4e85b2d 100644 --- a/app/src/main/res/values-de/strings.xml +++ b/app/src/main/res/values-de/strings.xml @@ -234,7 +234,7 @@ - Schlichte Galerie Pro: Foto Manager & Editor + Schlichte Galerie Pro - Foto Manager & Editor Browse your memories without any interruptions. diff --git a/app/src/main/res/values-el/strings.xml b/app/src/main/res/values-el/strings.xml index 62f32aee1..fc8071014 100644 --- a/app/src/main/res/values-el/strings.xml +++ b/app/src/main/res/values-el/strings.xml @@ -235,7 +235,7 @@ - ΑΠΛΗ ΣΥΛΛΟΓΗ Pro: Διαχείριση & Επεξεργασία + ΑΠΛΗ ΣΥΛΛΟΓΗ Pro - Διαχείριση & Επεξεργασία Ξεφυλλίστε τις αναμνήσεις σας χωρίς διακοπές. diff --git a/app/src/main/res/values-es/strings.xml b/app/src/main/res/values-es/strings.xml index f5914be0c..0ee6f14a4 100644 --- a/app/src/main/res/values-es/strings.xml +++ b/app/src/main/res/values-es/strings.xml @@ -235,7 +235,7 @@ - Simple Gallery Pro: Photo Manager & Editor + Simple Gallery Pro - Photo Manager & Editor Explore sus recuerdos sin interrupciones. diff --git a/app/src/main/res/values-fi/strings.xml b/app/src/main/res/values-fi/strings.xml index abe313e4a..f8144fe2d 100644 --- a/app/src/main/res/values-fi/strings.xml +++ b/app/src/main/res/values-fi/strings.xml @@ -235,7 +235,7 @@ - Simple Gallery Pro: Photo Manager & Editor + Simple Gallery Pro - Photo Manager & Editor Browse your memories without any interruptions. diff --git a/app/src/main/res/values-fr/strings.xml b/app/src/main/res/values-fr/strings.xml index 75eab0318..f9a4bdfbd 100644 --- a/app/src/main/res/values-fr/strings.xml +++ b/app/src/main/res/values-fr/strings.xml @@ -233,7 +233,7 @@ - Simple Gallery Pro: Photo Manager & Editor + Simple Gallery Pro - Photo Manager & Editor Browse your memories without any interruptions. diff --git a/app/src/main/res/values-gl/strings.xml b/app/src/main/res/values-gl/strings.xml index 3f6dc1e51..2a0fd706a 100644 --- a/app/src/main/res/values-gl/strings.xml +++ b/app/src/main/res/values-gl/strings.xml @@ -235,7 +235,7 @@ - Simple Gallery Pro: Photo Manager & Editor + Simple Gallery Pro - Photo Manager & Editor Browse your memories without any interruptions. diff --git a/app/src/main/res/values-hr/strings.xml b/app/src/main/res/values-hr/strings.xml index ff5947a29..7f72b193b 100644 --- a/app/src/main/res/values-hr/strings.xml +++ b/app/src/main/res/values-hr/strings.xml @@ -235,7 +235,7 @@ - Simple Gallery Pro: Photo Manager & Editor + Simple Gallery Pro - Photo Manager & Editor Browse your memories without any interruptions. diff --git a/app/src/main/res/values-hu/strings.xml b/app/src/main/res/values-hu/strings.xml index d3bb941c6..05178e032 100644 --- a/app/src/main/res/values-hu/strings.xml +++ b/app/src/main/res/values-hu/strings.xml @@ -236,7 +236,7 @@ Ezzel csak a kiválasztott mappák láthatók, mivel a kizárás és a befoglal - Simple Gallery Pro: Photo Manager & Editor + Simple Gallery Pro - Photo Manager & Editor Browse your memories without any interruptions. diff --git a/app/src/main/res/values-id/strings.xml b/app/src/main/res/values-id/strings.xml index eb78b57b2..dbd959a21 100644 --- a/app/src/main/res/values-id/strings.xml +++ b/app/src/main/res/values-id/strings.xml @@ -235,7 +235,7 @@ - Simple Gallery Pro: Pengelola & Penyunting Foto + Simple Gallery Pro - Pengelola & Penyunting Foto Browse your memories without any interruptions. diff --git a/app/src/main/res/values-in/strings.xml b/app/src/main/res/values-in/strings.xml index eb78b57b2..dbd959a21 100644 --- a/app/src/main/res/values-in/strings.xml +++ b/app/src/main/res/values-in/strings.xml @@ -235,7 +235,7 @@ - Simple Gallery Pro: Pengelola & Penyunting Foto + Simple Gallery Pro - Pengelola & Penyunting Foto Browse your memories without any interruptions. diff --git a/app/src/main/res/values-it/strings.xml b/app/src/main/res/values-it/strings.xml index 6115b58bf..3d5f28c7c 100644 --- a/app/src/main/res/values-it/strings.xml +++ b/app/src/main/res/values-it/strings.xml @@ -235,7 +235,7 @@ - Semplice Galleria Pro: gestore di foto & editor + Semplice Galleria Pro - gestore di foto & editor Browse your memories without any interruptions. diff --git a/app/src/main/res/values-ja/strings.xml b/app/src/main/res/values-ja/strings.xml index fd5837a65..3873aea87 100644 --- a/app/src/main/res/values-ja/strings.xml +++ b/app/src/main/res/values-ja/strings.xml @@ -235,7 +235,7 @@ - Simple Gallery Pro: Photo Manager & Editor + Simple Gallery Pro - Photo Manager & Editor Browse your memories without any interruptions. diff --git a/app/src/main/res/values-ko-rKR/strings.xml b/app/src/main/res/values-ko-rKR/strings.xml index 1c71ee8b7..3a23e4d01 100644 --- a/app/src/main/res/values-ko-rKR/strings.xml +++ b/app/src/main/res/values-ko-rKR/strings.xml @@ -235,7 +235,7 @@ - Simple Gallery Pro: Photo Manager & Editor + Simple Gallery Pro - Photo Manager & Editor Browse your memories without any interruptions. diff --git a/app/src/main/res/values-lt/strings.xml b/app/src/main/res/values-lt/strings.xml index a3b60935e..ad6e733c0 100644 --- a/app/src/main/res/values-lt/strings.xml +++ b/app/src/main/res/values-lt/strings.xml @@ -235,7 +235,7 @@ - Simple Gallery Pro: Photo Manager & Editor + Simple Gallery Pro - Photo Manager & Editor Browse your memories without any interruptions. diff --git a/app/src/main/res/values-nb/strings.xml b/app/src/main/res/values-nb/strings.xml index 3062eb85c..9e5ed7bd8 100644 --- a/app/src/main/res/values-nb/strings.xml +++ b/app/src/main/res/values-nb/strings.xml @@ -235,7 +235,7 @@ - Simple Gallery Pro: Photo Manager & Editor + Simple Gallery Pro - Photo Manager & Editor Browse your memories without any interruptions. diff --git a/app/src/main/res/values-pl/strings.xml b/app/src/main/res/values-pl/strings.xml index f38483479..021f302c4 100644 --- a/app/src/main/res/values-pl/strings.xml +++ b/app/src/main/res/values-pl/strings.xml @@ -233,7 +233,7 @@ - Simple Gallery Pro: Photo Manager & Editor + Simple Gallery Pro - Photo Manager & Editor Browse your memories without any interruptions. diff --git a/app/src/main/res/values-pt-rBR/strings.xml b/app/src/main/res/values-pt-rBR/strings.xml index 0f7b73e03..e5bfe22e3 100644 --- a/app/src/main/res/values-pt-rBR/strings.xml +++ b/app/src/main/res/values-pt-rBR/strings.xml @@ -234,7 +234,7 @@ - Simple Galeria Pro: Gerenciador de Imagens + Simple Galeria Pro - Gerenciador de Imagens Browse your memories without any interruptions. diff --git a/app/src/main/res/values-pt/strings.xml b/app/src/main/res/values-pt/strings.xml index 20b025104..3afb56f68 100644 --- a/app/src/main/res/values-pt/strings.xml +++ b/app/src/main/res/values-pt/strings.xml @@ -235,7 +235,7 @@ - Simple Gallery Pro: Editor e gestor de fotos + Simple Gallery Pro - Editor e gestor de fotos Browse your memories without any interruptions. diff --git a/app/src/main/res/values-ru/strings.xml b/app/src/main/res/values-ru/strings.xml index 5d3104a45..45e68137a 100644 --- a/app/src/main/res/values-ru/strings.xml +++ b/app/src/main/res/values-ru/strings.xml @@ -235,7 +235,7 @@ - Галерея Pro: управление изображениями + Галерея Pro - управление изображениями Browse your memories without any interruptions. diff --git a/app/src/main/res/values-sk/strings.xml b/app/src/main/res/values-sk/strings.xml index 000e10250..109d765f9 100644 --- a/app/src/main/res/values-sk/strings.xml +++ b/app/src/main/res/values-sk/strings.xml @@ -235,7 +235,7 @@ - Jednoduchá galéria Pro: Foto organizér a editor + Jednoduchá galéria Pro - Foto organizér a editor Prehliadajte svoje spomienky bez prerušenia. diff --git a/app/src/main/res/values-sl/strings.xml b/app/src/main/res/values-sl/strings.xml index 367031af9..ebfac19a5 100644 --- a/app/src/main/res/values-sl/strings.xml +++ b/app/src/main/res/values-sl/strings.xml @@ -235,7 +235,7 @@ - Simple Gallery Pro: Pregledovalnik fotografij + Simple Gallery Pro - Pregledovalnik fotografij Browse your memories without any interruptions. diff --git a/app/src/main/res/values-sr/strings.xml b/app/src/main/res/values-sr/strings.xml index 2c1e539c3..a2e82e684 100644 --- a/app/src/main/res/values-sr/strings.xml +++ b/app/src/main/res/values-sr/strings.xml @@ -235,7 +235,7 @@ - Simple Gallery Pro: Photo Manager & Editor + Simple Gallery Pro - Photo Manager & Editor Browse your memories without any interruptions. diff --git a/app/src/main/res/values-sv/strings.xml b/app/src/main/res/values-sv/strings.xml index 58cbec735..be177d669 100644 --- a/app/src/main/res/values-sv/strings.xml +++ b/app/src/main/res/values-sv/strings.xml @@ -235,7 +235,7 @@ - Simple Gallery Pro: Photo Manager & Editor + Simple Gallery Pro - Photo Manager & Editor Browse your memories without any interruptions. diff --git a/app/src/main/res/values-tr/strings.xml b/app/src/main/res/values-tr/strings.xml index 96eb263cc..4323a9f9f 100644 --- a/app/src/main/res/values-tr/strings.xml +++ b/app/src/main/res/values-tr/strings.xml @@ -235,7 +235,7 @@ - Basit Galeri Pro: Fotoğraf Yönetici & Düzenleyici + Basit Galeri Pro - Fotoğraf Yönetici & Düzenleyici Browse your memories without any interruptions. diff --git a/app/src/main/res/values-uk/strings.xml b/app/src/main/res/values-uk/strings.xml index c48b834ff..ae6a73028 100644 --- a/app/src/main/res/values-uk/strings.xml +++ b/app/src/main/res/values-uk/strings.xml @@ -235,7 +235,7 @@ - Simple Gallery Pro: фотоменеджер і редактор + Simple Gallery Pro - фотоменеджер і редактор Browse your memories without any interruptions. diff --git a/app/src/main/res/values-zh-rCN/strings.xml b/app/src/main/res/values-zh-rCN/strings.xml index 4c138cf8b..7f3c8c1c8 100644 --- a/app/src/main/res/values-zh-rCN/strings.xml +++ b/app/src/main/res/values-zh-rCN/strings.xml @@ -233,7 +233,7 @@ - 简约图库 Pro: 图片管理 & 编辑 + 简约图库 Pro - 图片管理 & 编辑 Browse your memories without any interruptions. diff --git a/app/src/main/res/values-zh-rHK/strings.xml b/app/src/main/res/values-zh-rHK/strings.xml index 85fff50b5..d7ebe00e6 100644 --- a/app/src/main/res/values-zh-rHK/strings.xml +++ b/app/src/main/res/values-zh-rHK/strings.xml @@ -235,7 +235,7 @@ - 簡易相簿 Pro: 相片管理&編輯器 + 簡易相簿 Pro - 相片管理&編輯器 Browse your memories without any interruptions. diff --git a/app/src/main/res/values-zh-rTW/strings.xml b/app/src/main/res/values-zh-rTW/strings.xml index 0b9195926..a015013e4 100644 --- a/app/src/main/res/values-zh-rTW/strings.xml +++ b/app/src/main/res/values-zh-rTW/strings.xml @@ -235,7 +235,7 @@ - 簡易相簿 Pro: 相片管理&編輯器 + 簡易相簿 Pro - 相片管理&編輯器 毫無阻礙地瀏覽您的回憶。 diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index 5b88aa8d1..4eee33fa8 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -235,7 +235,7 @@ - Simple Gallery Pro: Photo Manager & Editor + Simple Gallery Pro - Photo Manager & Editor Browse your memories without any interruptions. diff --git a/fastlane/metadata/android/ca/title.txt b/fastlane/metadata/android/ca/title.txt index c1dfdc276..30cd71181 100644 --- a/fastlane/metadata/android/ca/title.txt +++ b/fastlane/metadata/android/ca/title.txt @@ -1 +1 @@ -Simple Gallery Pro: Photo Manager & Editor +Simple Gallery Pro - Photo Manager & Editor diff --git a/fastlane/metadata/android/cs/title.txt b/fastlane/metadata/android/cs/title.txt index 6ca9a737f..085c5b107 100644 --- a/fastlane/metadata/android/cs/title.txt +++ b/fastlane/metadata/android/cs/title.txt @@ -1 +1 @@ -Jednoduchá Galerie Pro: Organizér a editor fotografií +Jednoduchá Galerie Pro - Organizér a editor fotografií diff --git a/fastlane/metadata/android/da/title.txt b/fastlane/metadata/android/da/title.txt index 02fce9849..f0efca5e3 100644 --- a/fastlane/metadata/android/da/title.txt +++ b/fastlane/metadata/android/da/title.txt @@ -1 +1 @@ -Simple Gallery Pro: Billedhåndtering +Simple Gallery Pro - Billedhåndtering diff --git a/fastlane/metadata/android/de/title.txt b/fastlane/metadata/android/de/title.txt index 7d4b68ff5..40b90918d 100644 --- a/fastlane/metadata/android/de/title.txt +++ b/fastlane/metadata/android/de/title.txt @@ -1 +1 @@ -Schlichte Galerie Pro: Foto Manager & Editor +Schlichte Galerie Pro - Foto Manager & Editor diff --git a/fastlane/metadata/android/el/title.txt b/fastlane/metadata/android/el/title.txt index 4e545c2bc..c8966b49b 100644 --- a/fastlane/metadata/android/el/title.txt +++ b/fastlane/metadata/android/el/title.txt @@ -1 +1 @@ -ΑΠΛΗ ΣΥΛΛΟΓΗ Pro: Διαχείριση & Επεξεργασία +ΑΠΛΗ ΣΥΛΛΟΓΗ Pro - Διαχείριση & Επεξεργασία diff --git a/fastlane/metadata/android/en-US/title.txt b/fastlane/metadata/android/en-US/title.txt index c1dfdc276..30cd71181 100644 --- a/fastlane/metadata/android/en-US/title.txt +++ b/fastlane/metadata/android/en-US/title.txt @@ -1 +1 @@ -Simple Gallery Pro: Photo Manager & Editor +Simple Gallery Pro - Photo Manager & Editor diff --git a/fastlane/metadata/android/id/title.txt b/fastlane/metadata/android/id/title.txt index 5041addb1..ad48eb484 100644 --- a/fastlane/metadata/android/id/title.txt +++ b/fastlane/metadata/android/id/title.txt @@ -1 +1 @@ -Simple Gallery Pro: Pengelola & Penyunting Foto +Simple Gallery Pro - Pengelola & Penyunting Foto diff --git a/fastlane/metadata/android/in/title.txt b/fastlane/metadata/android/in/title.txt index 5041addb1..ad48eb484 100644 --- a/fastlane/metadata/android/in/title.txt +++ b/fastlane/metadata/android/in/title.txt @@ -1 +1 @@ -Simple Gallery Pro: Pengelola & Penyunting Foto +Simple Gallery Pro - Pengelola & Penyunting Foto diff --git a/fastlane/metadata/android/it/title.txt b/fastlane/metadata/android/it/title.txt index cca13232b..acf110d0c 100644 --- a/fastlane/metadata/android/it/title.txt +++ b/fastlane/metadata/android/it/title.txt @@ -1 +1 @@ -Semplice Galleria Pro: gestore di foto & editor +Semplice Galleria Pro - gestore di foto & editor diff --git a/fastlane/metadata/android/pl/title.txt b/fastlane/metadata/android/pl/title.txt index c1dfdc276..30cd71181 100644 --- a/fastlane/metadata/android/pl/title.txt +++ b/fastlane/metadata/android/pl/title.txt @@ -1 +1 @@ -Simple Gallery Pro: Photo Manager & Editor +Simple Gallery Pro - Photo Manager & Editor diff --git a/fastlane/metadata/android/pt-rBR/title.txt b/fastlane/metadata/android/pt-rBR/title.txt index 145c42568..a2c4a37b8 100644 --- a/fastlane/metadata/android/pt-rBR/title.txt +++ b/fastlane/metadata/android/pt-rBR/title.txt @@ -1 +1 @@ -Simple Galeria Pro: Gerenciador de Imagens +Simple Galeria Pro - Gerenciador de Imagens diff --git a/fastlane/metadata/android/pt-rPT/title.txt b/fastlane/metadata/android/pt-rPT/title.txt index 2712016ee..2a70d695c 100644 --- a/fastlane/metadata/android/pt-rPT/title.txt +++ b/fastlane/metadata/android/pt-rPT/title.txt @@ -1 +1 @@ -Simple Gallery Pro: Editor e gestor de fotos +Simple Gallery Pro - Editor e gestor de fotos diff --git a/fastlane/metadata/android/ru/title.txt b/fastlane/metadata/android/ru/title.txt index 28d44cb7f..3abd8ae20 100644 --- a/fastlane/metadata/android/ru/title.txt +++ b/fastlane/metadata/android/ru/title.txt @@ -1 +1 @@ -Галерея: управление изображениями +Галерея Pro - управление изображениями diff --git a/fastlane/metadata/android/sk/title.txt b/fastlane/metadata/android/sk/title.txt index b5bd6d5c8..1766b4e51 100644 --- a/fastlane/metadata/android/sk/title.txt +++ b/fastlane/metadata/android/sk/title.txt @@ -1 +1 @@ -Jednoduchá galéria Pro: Foto organizér a editor +Jednoduchá galéria Pro - Foto organizér a editor diff --git a/fastlane/metadata/android/sr/title.txt b/fastlane/metadata/android/sr/title.txt index c1dfdc276..30cd71181 100644 --- a/fastlane/metadata/android/sr/title.txt +++ b/fastlane/metadata/android/sr/title.txt @@ -1 +1 @@ -Simple Gallery Pro: Photo Manager & Editor +Simple Gallery Pro - Photo Manager & Editor diff --git a/fastlane/metadata/android/tr/title.txt b/fastlane/metadata/android/tr/title.txt index 6e928759d..7110dfc6f 100644 --- a/fastlane/metadata/android/tr/title.txt +++ b/fastlane/metadata/android/tr/title.txt @@ -1 +1 @@ -Basit Galeri Pro: Fotoğraf Yönetici & Düzenleyici +Basit Galeri Pro - Fotoğraf Yönetici & Düzenleyici diff --git a/fastlane/metadata/android/uk/title.txt b/fastlane/metadata/android/uk/title.txt index 61637334f..f7ab0e5e1 100644 --- a/fastlane/metadata/android/uk/title.txt +++ b/fastlane/metadata/android/uk/title.txt @@ -1 +1 @@ -Simple Gallery Pro: фотоменеджер і редактор +Simple Gallery Pro - фотоменеджер і редактор diff --git a/fastlane/metadata/android/zh-rCN/title.txt b/fastlane/metadata/android/zh-rCN/title.txt index 926520f1d..2a36913ac 100644 --- a/fastlane/metadata/android/zh-rCN/title.txt +++ b/fastlane/metadata/android/zh-rCN/title.txt @@ -1 +1 @@ -简约图库 Pro: 图片管理 & 编辑 +简约图库 Pro - 图片管理 & 编辑 diff --git a/fastlane/metadata/android/zh-rHK/title.txt b/fastlane/metadata/android/zh-rHK/title.txt index 9dc20e054..9625d110f 100644 --- a/fastlane/metadata/android/zh-rHK/title.txt +++ b/fastlane/metadata/android/zh-rHK/title.txt @@ -1 +1 @@ -簡易相簿 Pro: 相片管理&編輯器 +簡易相簿 Pro - 相片管理&編輯器 diff --git a/fastlane/metadata/android/zh-rTW/title.txt b/fastlane/metadata/android/zh-rTW/title.txt index 9dc20e054..9625d110f 100644 --- a/fastlane/metadata/android/zh-rTW/title.txt +++ b/fastlane/metadata/android/zh-rTW/title.txt @@ -1 +1 @@ -簡易相簿 Pro: 相片管理&編輯器 +簡易相簿 Pro - 相片管理&編輯器