mirror of
https://github.com/tateisu/SubwayTooter
synced 2025-01-10 16:34:41 +01:00
- androidx.core:core-ktx:1.8.0
- com.google.android.material:material:1.6.1 - okhttpVersion = "4.9.3" - appcompat_version = "1.4.2"
This commit is contained in:
parent
eae1c313f0
commit
4751430b74
@ -146,7 +146,7 @@ dependencies {
|
||||
|
||||
implementation "androidx.appcompat:appcompat:$appcompat_version"
|
||||
|
||||
implementation "androidx.core:core-ktx:1.7.0"
|
||||
implementation "androidx.core:core-ktx:1.8.0"
|
||||
|
||||
def emoji2Version = "1.1.0"
|
||||
implementation "androidx.emoji2:emoji2:$emoji2Version"
|
||||
@ -158,7 +158,7 @@ dependencies {
|
||||
implementation "androidx.drawerlayout:drawerlayout:1.1.1"
|
||||
|
||||
// NavigationView
|
||||
implementation "com.google.android.material:material:1.6.0"
|
||||
implementation "com.google.android.material:material:1.6.1"
|
||||
|
||||
implementation "androidx.exifinterface:exifinterface:1.3.3"
|
||||
|
||||
@ -183,7 +183,7 @@ dependencies {
|
||||
|
||||
testImplementation "junit:junit:$junit_version" // しばらくはkotlin-testとjunitを併用
|
||||
|
||||
def okhttpVersion = "4.9.2"
|
||||
def okhttpVersion = "4.9.3"
|
||||
implementation "com.squareup.okhttp3:okhttp:$okhttpVersion"
|
||||
implementation "com.squareup.okhttp3:okhttp-urlconnection:$okhttpVersion"
|
||||
|
||||
|
@ -2,23 +2,15 @@ package jp.juggler.subwaytooter.util
|
||||
|
||||
import jp.juggler.util.LogCategory
|
||||
import kotlinx.coroutines.runBlocking
|
||||
import java.io.IOException
|
||||
import java.io.InputStream
|
||||
import java.nio.charset.Charset
|
||||
|
||||
import okhttp3.Interceptor
|
||||
import okhttp3.MediaType
|
||||
import okhttp3.Response
|
||||
import okhttp3.ResponseBody
|
||||
import okio.Buffer
|
||||
import okio.BufferedSource
|
||||
import okio.ByteString
|
||||
import okio.Options
|
||||
import okio.Sink
|
||||
import okio.Source
|
||||
import okio.Timeout
|
||||
import okio.*
|
||||
import java.io.IOException
|
||||
import java.io.InputStream
|
||||
import java.nio.ByteBuffer
|
||||
import kotlin.jvm.Throws
|
||||
import java.nio.charset.Charset
|
||||
import kotlin.math.max
|
||||
|
||||
class ProgressResponseBody private constructor(
|
||||
@ -41,7 +33,10 @@ class ProgressResponseBody private constructor(
|
||||
}
|
||||
|
||||
@Throws(IOException::class)
|
||||
fun bytes(response: Response, callback: suspend (bytesRead: Long, bytesTotal: Long) -> Unit): ByteArray {
|
||||
fun bytes(
|
||||
response: Response,
|
||||
callback: suspend (bytesRead: Long, bytesTotal: Long) -> Unit,
|
||||
): ByteArray {
|
||||
val body = response.body ?: error("response.body() is null.")
|
||||
return bytes(body, callback)
|
||||
}
|
||||
@ -141,7 +136,6 @@ class ProgressResponseBody private constructor(
|
||||
override fun source(): BufferedSource = wrappedSource
|
||||
|
||||
// To avoid double buffering, We have to make ForwardingBufferedSource.
|
||||
@Suppress("TooManyFunctions")
|
||||
internal open class ForwardingBufferedSource(
|
||||
private val originalSource: BufferedSource,
|
||||
) : BufferedSource {
|
||||
@ -149,8 +143,9 @@ class ProgressResponseBody private constructor(
|
||||
override val buffer: Buffer
|
||||
get() = originalSource.buffer
|
||||
|
||||
@Deprecated("use val buffer.", replaceWith = ReplaceWith("buffer"))
|
||||
@Suppress("DEPRECATION", "OverridingDeprecatedMember")
|
||||
override fun buffer(): Buffer = originalSource.buffer()
|
||||
override fun buffer() = buffer
|
||||
|
||||
override fun peek(): BufferedSource = originalSource.peek()
|
||||
|
||||
|
@ -6,7 +6,7 @@ buildscript {
|
||||
ext.target_sdk_version = 31
|
||||
ext.compile_sdk_version = 31
|
||||
|
||||
ext.appcompat_version = "1.4.1"
|
||||
ext.appcompat_version = "1.4.2"
|
||||
ext.lifecycle_version = "2.4.1"
|
||||
ext.arch_version = "2.1.0"
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user