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 220984953..64365f414 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 @@ -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 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 1fdecf9e6..ac66ecafb 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 @@ -772,7 +772,6 @@ fun BaseSimpleActivity.ensureWriteAccess(path: String, callback: () -> Unit) { } } -@TargetApi(Build.VERSION_CODES.N) fun BaseSimpleActivity.launchResizeMultipleImagesDialog(paths: List, callback: (() -> Unit)? = null) { ensureBackgroundThread { val imagePaths = mutableListOf() @@ -793,7 +792,6 @@ fun BaseSimpleActivity.launchResizeMultipleImagesDialog(paths: List, 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 ->