Skip to content

Commit e4bf26f

Browse files
committed
update kotlinx/ktor
1 parent e39351e commit e4bf26f

File tree

11 files changed

+14
-14
lines changed

11 files changed

+14
-14
lines changed

build.gradle

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,8 @@ plugins {
1818
}
1919

2020
def klockVersion = "2.4.13"
21-
def ktorVersion = "1.4.0"
22-
def coroutinesVersion = "1.5.1-new-mm-dev2"
21+
def ktorVersion = "1.6.7"
22+
def coroutinesVersion = "1.6.0"
2323

2424
repositories {
2525
mavenCentral()
@@ -48,10 +48,10 @@ publishing {
4848
}
4949

5050
android { // android specific configuration
51-
compileSdkVersion 29 // SDK version to compile against
51+
compileSdkVersion 31 // SDK version to compile against
5252
defaultConfig {
5353
minSdkVersion 15 // min SDK version supported by this lib
54-
targetSdkVersion 29 // max SDK version supported by this lib
54+
targetSdkVersion 31 // max SDK version supported by this lib
5555
versionCode 1
5656
versionName getVersion()
5757
testInstrumentationRunner 'android.support.test.runner.AndroidJUnitRunner' // See notes #1

src/commonMain/kotlin/io/rebble/libpebblecommon/ProtocolHandlerImpl.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ class ProtocolHandlerImpl() : ProtocolHandler {
9494
}
9595

9696
override suspend fun getNextPacketOrNull(): ProtocolHandler.PendingPacket? {
97-
return normalPriorityPackets.poll() ?: lowPriorityPackets.poll()
97+
return normalPriorityPackets.tryReceive().getOrNull() ?: lowPriorityPackets.tryReceive().getOrNull()
9898
}
9999

100100
/**

src/commonMain/kotlin/io/rebble/libpebblecommon/services/AppFetchService.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ class AppFetchService(private val protocolHandler: ProtocolHandler) : ProtocolSe
2323
throw IllegalStateException("Received invalid packet type: $packet")
2424
}
2525

26-
receivedMessages.offer(packet)
26+
receivedMessages.trySend(packet)
2727
}
2828

2929
}

src/commonMain/kotlin/io/rebble/libpebblecommon/services/AppLogService.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,6 @@ class AppLogService(private val protocolHandler: ProtocolHandler) : ProtocolServ
2323
throw IllegalStateException("Received invalid packet type: $packet")
2424
}
2525

26-
receivedMessages.offer(packet)
26+
receivedMessages.trySend(packet)
2727
}
2828
}

src/commonMain/kotlin/io/rebble/libpebblecommon/services/AppReorderService.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,6 @@ class AppReorderService(private val protocolHandler: ProtocolHandler) : Protocol
3131
}
3232

3333
lastOrderPacket = null
34-
receivedMessages.offer(packet)
34+
receivedMessages.trySend(packet)
3535
}
3636
}

src/commonMain/kotlin/io/rebble/libpebblecommon/services/MusicService.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ class MusicService(private val protocolHandler: ProtocolHandler) : ProtocolServi
2222
throw IllegalStateException("Received invalid packet type: $packet")
2323
}
2424

25-
receivedMessages.offer(packet)
25+
receivedMessages.trySend(packet)
2626
}
2727

2828
}

src/commonMain/kotlin/io/rebble/libpebblecommon/services/PutBytesService.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ class PutBytesService(private val protocolHandler: ProtocolHandler) : ProtocolSe
2323
throw IllegalStateException("Received invalid packet type: $packet")
2424
}
2525

26-
receivedMessages.offer(packet)
26+
receivedMessages.trySend(packet)
2727
}
2828

2929
}

src/commonMain/kotlin/io/rebble/libpebblecommon/services/ScreenshotService.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ class ScreenshotService(private val protocolHandler: ProtocolHandler) : Protocol
2323
throw IllegalStateException("Received invalid packet type: $packet")
2424
}
2525

26-
receivedMessages.offer(packet)
26+
receivedMessages.trySend(packet)
2727
}
2828

2929
}

src/commonMain/kotlin/io/rebble/libpebblecommon/services/SystemService.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ class SystemService(private val protocolHandler: ProtocolHandler) : ProtocolServ
8181
send(res) // Cannot be low priority
8282
}
8383
}
84-
else -> receivedMessages.offer(packet)
84+
else -> receivedMessages.trySend(packet)
8585
}
8686
}
8787

src/commonMain/kotlin/io/rebble/libpebblecommon/services/app/AppRunStateService.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ class AppRunStateService(private val protocolHandler: ProtocolHandler) : Protoco
2323
throw IllegalStateException("Received invalid packet type: $packet")
2424
}
2525

26-
receivedMessages.offer(packet)
26+
receivedMessages.trySend(packet)
2727
}
2828

2929
}

0 commit comments

Comments
 (0)