mirror of
https://github.com/screentinker/screentinker.git
synced 2026-05-15 07:32:23 -06:00
Android: bump to 1.7.8 + fix safeOn return type
Released APK 1.7.8 includes the OOM/crash-loop fix, WebSocket crash hardening, and the http(s)-only ImageLoader scheme guard. Bumped versionCode 10 -> 11 and versionName 1.7.7 -> 1.7.8 so existing 1.7.7 installs auto-update on the next UpdateChecker poll. Also fixed the safeOn extension function: Socket.on() returns Emitter, not Socket, so the original `return on(...)` failed compile with a type mismatch. Switched to `on(...); return this` for proper chaining. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
a4c85eaabc
commit
66a137cffe
|
|
@ -11,8 +11,8 @@ android {
|
||||||
applicationId = "com.remotedisplay.player"
|
applicationId = "com.remotedisplay.player"
|
||||||
minSdk = 26
|
minSdk = 26
|
||||||
targetSdk = 34
|
targetSdk = 34
|
||||||
versionCode = 10
|
versionCode = 11
|
||||||
versionName = "1.7.7"
|
versionName = "1.7.8"
|
||||||
}
|
}
|
||||||
|
|
||||||
signingConfigs {
|
signingConfigs {
|
||||||
|
|
|
||||||
|
|
@ -69,7 +69,7 @@ class WebSocketService : Service() {
|
||||||
// (or a transient state error during disconnect) used to surface as an unhandled
|
// (or a transient state error during disconnect) used to surface as an unhandled
|
||||||
// exception on the Socket.IO IO thread and crash the whole app.
|
// exception on the Socket.IO IO thread and crash the whole app.
|
||||||
private fun Socket.safeOn(event: String, handler: (Array<Any?>) -> Unit): Socket {
|
private fun Socket.safeOn(event: String, handler: (Array<Any?>) -> Unit): Socket {
|
||||||
return on(event) { args ->
|
on(event) { args ->
|
||||||
try {
|
try {
|
||||||
@Suppress("UNCHECKED_CAST")
|
@Suppress("UNCHECKED_CAST")
|
||||||
handler(args as Array<Any?>)
|
handler(args as Array<Any?>)
|
||||||
|
|
@ -77,6 +77,7 @@ class WebSocketService : Service() {
|
||||||
Log.e("WebSocketService", "Listener for '$event' failed: ${e.message}", e)
|
Log.e("WebSocketService", "Listener for '$event' failed: ${e.message}", e)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
return this
|
||||||
}
|
}
|
||||||
|
|
||||||
fun connect(serverUrl: String? = null) {
|
fun connect(serverUrl: String? = null) {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue