File tree Expand file tree Collapse file tree 3 files changed +5
-6
lines changed
src/main/java/com/dan/perspective Expand file tree Collapse file tree 3 files changed +5
-6
lines changed Original file line number Diff line number Diff line change @@ -78,5 +78,5 @@ dependencies {
7878 implementation " org.jetbrains.kotlinx:kotlinx-coroutines-core:1.4.2-native-mt"
7979 implementation " org.jetbrains.kotlinx:kotlinx-coroutines-android:1.3.9"
8080 implementation " androidx.documentfile:documentfile:1.0.1"
81- implementation(" androidx.exifinterface:exifinterface:1.3.3 " )
81+ implementation(" androidx.exifinterface:exifinterface:1.3.6 " )
8282}
Original file line number Diff line number Diff line change @@ -11,7 +11,7 @@ import java.lang.Exception
1111class ExifTools {
1212 companion object {
1313
14- val EXIF_TAGS = listOf (
14+ private val EXIF_TAGS = listOf (
1515 ExifInterface .TAG_APERTURE_VALUE ,
1616 ExifInterface .TAG_DATETIME ,
1717 ExifInterface .TAG_DATETIME_DIGITIZED ,
Original file line number Diff line number Diff line change @@ -194,6 +194,7 @@ class MainFragment(activity: MainActivity) : AppFragment(activity) {
194194 private fun setImage (uri : Uri , suggestedName : String? = null) {
195195 val matAndBitmap = loadImage(uri)
196196 if (null == matAndBitmap) {
197+ inputUri = null
197198 showToast(" Failed to load the image" )
198199 return
199200 }
@@ -207,10 +208,7 @@ class MainFragment(activity: MainActivity) : AppFragment(activity) {
207208 outputName = Settings .DEFAULT_NAME
208209
209210 try {
210- DocumentFile .fromSingleUri(
211- requireContext(),
212- uri
213- )?.name?.let { name ->
211+ DocumentFile .fromSingleUri(requireContext(), uri)?.name?.let { name ->
214212 if (name.isNotEmpty()) {
215213 val fields = name.split(' .' )
216214 outputName = fields[0 ]
@@ -221,6 +219,7 @@ class MainFragment(activity: MainActivity) : AppFragment(activity) {
221219 }
222220 }
223221
222+ inputUri = uri
224223 clearOutputImage()
225224 updateButtons()
226225
You can’t perform that action at this time.
0 commit comments