@@ -6,8 +6,6 @@ import android.animation.ValueAnimator
6
6
import android.content.Intent
7
7
import android.graphics.BitmapFactory
8
8
import android.graphics.Matrix
9
- // noinspection ExifInterface TODO Issue : #5994
10
- import android.media.ExifInterface
11
9
import android.os.Bundle
12
10
import android.view.animation.AccelerateDecelerateInterpolator
13
11
import android.widget.ImageView
@@ -16,6 +14,7 @@ import androidx.appcompat.app.AppCompatActivity
16
14
import androidx.core.graphics.rotationMatrix
17
15
import androidx.core.graphics.scaleMatrix
18
16
import androidx.core.net.toUri
17
+ import androidx.exifinterface.media.ExifInterface
19
18
import androidx.lifecycle.ViewModelProvider
20
19
import fr.free.nrw.commons.databinding.ActivityEditBinding
21
20
import timber.log.Timber
@@ -45,12 +44,10 @@ class EditActivity : AppCompatActivity() {
45
44
imageUri = intent.getStringExtra(" image" ) ? : " "
46
45
vm = ViewModelProvider (this )[EditViewModel ::class .java]
47
46
val sourceExif = imageUri.toUri().path?.let { ExifInterface (it) }
48
- // TODO(Deprecation : 'TAG_APERTURE: String' is deprecated. Deprecated in Java) Issue : #6001
49
- // TODO(Deprecation : 'TAG_ISO: String' is deprecated. Deprecated in Java) Issue : #6001
50
- @Suppress(" DEPRECATION" )
47
+
51
48
val exifTags =
52
49
arrayOf(
53
- ExifInterface .TAG_APERTURE ,
50
+ ExifInterface .TAG_F_NUMBER ,
54
51
ExifInterface .TAG_DATETIME ,
55
52
ExifInterface .TAG_EXPOSURE_TIME ,
56
53
ExifInterface .TAG_FLASH ,
@@ -66,13 +63,13 @@ class EditActivity : AppCompatActivity() {
66
63
ExifInterface .TAG_GPS_TIMESTAMP ,
67
64
ExifInterface .TAG_IMAGE_LENGTH ,
68
65
ExifInterface .TAG_IMAGE_WIDTH ,
69
- ExifInterface .TAG_ISO ,
66
+ ExifInterface .TAG_PHOTOGRAPHIC_SENSITIVITY ,
70
67
ExifInterface .TAG_MAKE ,
71
68
ExifInterface .TAG_MODEL ,
72
69
ExifInterface .TAG_ORIENTATION ,
73
70
ExifInterface .TAG_WHITE_BALANCE ,
74
- ExifInterface .WHITEBALANCE_AUTO ,
75
- ExifInterface .WHITEBALANCE_MANUAL ,
71
+ ExifInterface .WHITE_BALANCE_AUTO ,
72
+ ExifInterface .WHITE_BALANCE_MANUAL ,
76
73
)
77
74
for (tag in exifTags) {
78
75
val attribute = sourceExif?.getAttribute(tag.toString())
0 commit comments