Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions app/src/main/java/com/nextcloud/talk/utils/PickImage.kt
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ import java.io.IOException
import java.io.InputStream
import javax.inject.Inject

private const val TAG: String = "PickImage"
private const val FULL_QUALITY: Int = 100

/**
Expand All @@ -69,7 +70,7 @@ internal fun decodeAvatarToFile(
val bitmap = body?.use { decode(it.byteStream()) }
if (bitmap == null) {
val cause = if (body == null) "request returned no body" else "could not be decoded"
Log.e("PickImage", "Avatar thumbnail $cause")
Log.e(TAG, "Avatar thumbnail $cause")
return null
}
return try {
Expand All @@ -80,7 +81,7 @@ internal fun decodeAvatarToFile(
if (!written) throw IOException("Bitmap.compress returned false")
file
} catch (e: IOException) {
Log.e("PickImage", "Error saving the avatar image", e)
Log.e(TAG, "Error saving the avatar image", e)
null
}
}
Expand Down Expand Up @@ -226,7 +227,6 @@ class PickImage(private val activity: ComponentActivity, private var currentUser
}

companion object {
private const val TAG: String = "PickImage"
private const val MAX_SIZE: Int = 1024
private const val AVATAR_PATH = "photos/avatar.png"
private const val CAMERA_CAPTURE_PATH = "photos/camera_capture.jpg"
Expand Down
Loading