mirror of
https://github.com/FossifyOrg/Gallery.git
synced 2024-11-22 20:48:00 +01:00
Remove unused code
This commit is contained in:
parent
591e5f09e9
commit
295793c77f
2 changed files with 0 additions and 28 deletions
|
@ -1045,37 +1045,11 @@ class ViewPagerActivity : SimpleActivity(), ViewPager.OnPageChangeListener, View
|
|||
}
|
||||
}
|
||||
|
||||
@TargetApi(Build.VERSION_CODES.N)
|
||||
private fun resizeImage() {
|
||||
val oldPath = getCurrentPath()
|
||||
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() {
|
||||
if (getCurrentMedium() == null) {
|
||||
return
|
||||
|
|
|
@ -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) {
|
||||
ensureBackgroundThread {
|
||||
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) {
|
||||
val originalSize = path.getImageResolution(this) ?: return
|
||||
ResizeWithPathDialog(this, originalSize, path) { newSize, newPath ->
|
||||
|
|
Loading…
Reference in a new issue