properly retrieve old last_modified at rotating files by exif
This commit is contained in:
parent
57e7fb03d1
commit
247b41445d
1 changed files with 6 additions and 0 deletions
|
@ -665,7 +665,13 @@ class ViewPagerActivity : SimpleActivity(), ViewPager.OnPageChangeListener, View
|
|||
@TargetApi(Build.VERSION_CODES.N)
|
||||
private fun tryRotateByExif(path: String): Boolean {
|
||||
return try {
|
||||
val file = File(path)
|
||||
val oldLastModified = file.lastModified()
|
||||
if (saveImageRotation(path, mRotationDegrees)) {
|
||||
if (config.keepLastModified) {
|
||||
file.setLastModified(oldLastModified)
|
||||
updateLastModified(path, oldLastModified)
|
||||
}
|
||||
mRotationDegrees = 0
|
||||
invalidateOptionsMenu()
|
||||
toast(R.string.file_saved)
|
||||
|
|
Loading…
Reference in a new issue