Remove unused code

This commit is contained in:
Naveen 2023-05-24 04:34:36 +05:30
parent 591e5f09e9
commit 295793c77f
No known key found for this signature in database
GPG key ID: 0E155DAD31671DA3
2 changed files with 0 additions and 28 deletions

View file

@ -1045,37 +1045,11 @@ class ViewPagerActivity : SimpleActivity(), ViewPager.OnPageChangeListener, View
} }
} }
@TargetApi(Build.VERSION_CODES.N)
private fun resizeImage() { private fun resizeImage() {
val oldPath = getCurrentPath() val oldPath = getCurrentPath()
launchResizeImageDialog(oldPath) launchResizeImageDialog(oldPath)
} }
@TargetApi(Build.VERSION_CODES.N)
private fun saveBitmap(file: File, bitmap: Bitmap, out: OutputStream, oldExif: ExifInterface?, lastModified: Long) {
try {
bitmap.compress(file.absolutePath.getCompressionFormat(), 90, out)
if (isNougatPlus()) {
val newExif = ExifInterface(file.absolutePath)
oldExif?.copyNonDimensionAttributesTo(newExif)
}
} catch (e: Exception) {
}
toast(R.string.file_saved)
val paths = arrayListOf(file.absolutePath)
rescanPaths(paths) {
fixDateTaken(paths, false)
if (config.keepLastModified && lastModified != 0L) {
File(file.absolutePath).setLastModified(lastModified)
updateLastModified(file.absolutePath, lastModified)
}
}
out.close()
}
private fun checkDeleteConfirmation() { private fun checkDeleteConfirmation() {
if (getCurrentMedium() == null) { if (getCurrentMedium() == null) {
return return

View file

@ -772,7 +772,6 @@ fun BaseSimpleActivity.ensureWriteAccess(path: String, callback: () -> Unit) {
} }
} }
@TargetApi(Build.VERSION_CODES.N)
fun BaseSimpleActivity.launchResizeMultipleImagesDialog(paths: List<String>, callback: (() -> Unit)? = null) { fun BaseSimpleActivity.launchResizeMultipleImagesDialog(paths: List<String>, callback: (() -> Unit)? = null) {
ensureBackgroundThread { ensureBackgroundThread {
val imagePaths = mutableListOf<String>() val imagePaths = mutableListOf<String>()
@ -793,7 +792,6 @@ fun BaseSimpleActivity.launchResizeMultipleImagesDialog(paths: List<String>, cal
} }
} }
@TargetApi(Build.VERSION_CODES.N)
fun BaseSimpleActivity.launchResizeImageDialog(path: String, callback: (() -> Unit)? = null) { fun BaseSimpleActivity.launchResizeImageDialog(path: String, callback: (() -> Unit)? = null) {
val originalSize = path.getImageResolution(this) ?: return val originalSize = path.getImageResolution(this) ?: return
ResizeWithPathDialog(this, originalSize, path) { newSize, newPath -> ResizeWithPathDialog(this, originalSize, path) { newSize, newPath ->