Use Timber log instead of printStackTrace.
This commit is contained in:
parent
5db1010e47
commit
a01482dca4
|
@ -50,4 +50,7 @@ dependencies {
|
|||
androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0'
|
||||
|
||||
implementation 'androidx.exifinterface:exifinterface:1.3.0-alpha01'
|
||||
|
||||
// Log
|
||||
implementation 'com.jakewharton.timber:timber:4.7.1'
|
||||
}
|
||||
|
|
|
@ -23,6 +23,7 @@ import android.graphics.ImageDecoder
|
|||
import android.net.Uri
|
||||
import android.os.Build
|
||||
import androidx.exifinterface.media.ExifInterface
|
||||
import timber.log.Timber
|
||||
|
||||
object ImageUtils {
|
||||
|
||||
|
@ -36,7 +37,7 @@ object ImageUtils {
|
|||
}
|
||||
}
|
||||
} catch (e: Exception) {
|
||||
e.printStackTrace()
|
||||
Timber.e(e, "Cannot decode Bitmap: %s", uri.toString())
|
||||
null
|
||||
}
|
||||
}
|
||||
|
@ -49,7 +50,7 @@ object ImageUtils {
|
|||
orientation = it.rotationDegrees
|
||||
}
|
||||
} catch (e: Exception) {
|
||||
e.printStackTrace()
|
||||
Timber.e(e, "Cannot read orientation: %s", uri.toString())
|
||||
}
|
||||
}
|
||||
return orientation
|
||||
|
|
Loading…
Reference in New Issue