mirror of
https://github.com/twinksoftware/Gearslip.git
synced 2026-11-11 00:12:24 +01:00
Session reports say Wi-Fi when a wireless link fails, not USB
This commit is contained in:
1 parent
a1dc9a6519
commit
588d13c3a8
2 files changed
+4
-2
No files matched your search
@@ -160,7 +160,8 @@ class GearslipRunner(
|
||||
} catch (t: Throwable) {
|
||||
if (stopped) return
|
||||
log.e("transport failed in state $state", t)
|
||||
SessionReport.fail(SessionReport.Category.USB, "transport failed", t, state.name)
|
||||
val link = if (wireless) SessionReport.Category.WIFI else SessionReport.Category.USB
|
||||
SessionReport.fail(link, "transport failed", t, state.name)
|
||||
reportDisconnect()
|
||||
} finally {
|
||||
running = false
|
||||
|
||||
@@ -18,6 +18,7 @@ object SessionReport {
|
||||
enum class Category(val label: String) {
|
||||
NONE("none"),
|
||||
USB("USB transport"),
|
||||
WIFI("Wi-Fi transport"),
|
||||
NO_HANDSHAKE("head unit never started talking"),
|
||||
TLS("TLS handshake failed"),
|
||||
CERTIFICATE("certificate rejected by the head unit"),
|
||||
@@ -218,7 +219,7 @@ object SessionReport {
|
||||
// switching the car off at the end shows up as a USB or ByeBye "failure" that isn't one.
|
||||
val reached = carScreen.isNotEmpty()
|
||||
val outcome = when {
|
||||
reached && category in setOf(Category.NONE, Category.USB, Category.BYEBYE) -> "connected"
|
||||
reached && category in setOf(Category.NONE, Category.USB, Category.WIFI, Category.BYEBYE) -> "connected"
|
||||
reached -> "connected, then ${category.label}"
|
||||
category == Category.NONE -> "ended before video"
|
||||
else -> category.label
|
||||
|
||||
Reference in new issue
Block a user