use Log.error instead of e.printstacktrace()

Signed-off-by: Giacomo Pacini <giacomopacini98@gmail.com>
This commit is contained in:
Giacomo Pacini 2024-12-19 11:57:34 +01:00
parent e0024e54f4
commit 7542b310e0
No known key found for this signature in database
GPG Key ID: 2FBC97406B43D889

View File

@ -1659,7 +1659,8 @@ class ChatActivity :
retriever.release() // Always release the retriever to free resources retriever.release() // Always release the retriever to free resources
(durationStr?.toIntOrNull() ?: 0 )/ 1000 // Convert to int (seconds) (durationStr?.toIntOrNull() ?: 0 )/ 1000 // Convert to int (seconds)
} catch (e: Exception) { } catch (e: Exception) {
e.printStackTrace() Log.e(TAG, "An exception occurred while computing " +
"voice message duration for " + filename, e)
0 0
} }
adapter?.update(curMsg) adapter?.update(curMsg)
@ -1673,7 +1674,8 @@ class ChatActivity :
retriever.release() // Always release the retriever to free resources retriever.release() // Always release the retriever to free resources
(durationStr?.toIntOrNull() ?: 0 )/ 1000 // Convert to int (seconds) (durationStr?.toIntOrNull() ?: 0 )/ 1000 // Convert to int (seconds)
} catch (e: Exception) { } catch (e: Exception) {
e.printStackTrace() Log.e(TAG, "An exception occurred while computing " +
"voice message duration for " + filename, e)
0 0
} }
adapter?.update(curMsg) adapter?.update(curMsg)