Skip to content

Commit

Permalink
Update dependencies and fix lints
Browse files Browse the repository at this point in the history
  • Loading branch information
JingMatrix committed Aug 18, 2023
1 parent b6a7b5f commit f5993c0
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,9 @@ class DevToolClient(tabId: String) : LocalSocket() {
} else if (len > 0x7d) {
throw Exception("Invalid frame length ${len}")
}
val frame = String(inputStream.readNBytes(len))
val buffer = ByteArray(len)
inputStream.read(buffer, 0, len)
val frame = String(buffer)
if (type == (0x80 or 0xA)) {
callback(JSONObject(mapOf("pong" to frame)))
} else {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ class XMLHttpRequest(id: String, request: JSONObject, uuid: Double, currentTab:

val res =
if (responseType !in listOf("", "text", "document", "json")) {
Base64.encodeToString(inputStream.readAllBytes(), Base64.DEFAULT)
Base64.encodeToString(inputStream.readBytes(), Base64.DEFAULT)
} else {
inputStream.bufferedReader().use { it.readText() }
}
Expand Down
4 changes: 2 additions & 2 deletions build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import com.ncorti.ktfmt.gradle.tasks.KtfmtFormatTask

plugins {
id("com.android.application") version "8.1.0-beta05" apply false
id("org.jetbrains.kotlin.android") version "1.8.22" apply false
id("com.android.application") version "8.1.0" apply false
id("org.jetbrains.kotlin.android") version "1.9.0" apply false
id("com.ncorti.ktfmt.gradle") version "0.12.0"
}

Expand Down

0 comments on commit f5993c0

Please sign in to comment.