mirror of
https://github.com/twinksoftware/Gearslip.git
synced 2026-11-10 16:02:25 +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) {
|
} catch (t: Throwable) {
|
||||||
if (stopped) return
|
if (stopped) return
|
||||||
log.e("transport failed in state $state", t)
|
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()
|
reportDisconnect()
|
||||||
} finally {
|
} finally {
|
||||||
running = false
|
running = false
|
||||||
|
|||||||
@@ -18,6 +18,7 @@ object SessionReport {
|
|||||||
enum class Category(val label: String) {
|
enum class Category(val label: String) {
|
||||||
NONE("none"),
|
NONE("none"),
|
||||||
USB("USB transport"),
|
USB("USB transport"),
|
||||||
|
WIFI("Wi-Fi transport"),
|
||||||
NO_HANDSHAKE("head unit never started talking"),
|
NO_HANDSHAKE("head unit never started talking"),
|
||||||
TLS("TLS handshake failed"),
|
TLS("TLS handshake failed"),
|
||||||
CERTIFICATE("certificate rejected by the head unit"),
|
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.
|
// switching the car off at the end shows up as a USB or ByeBye "failure" that isn't one.
|
||||||
val reached = carScreen.isNotEmpty()
|
val reached = carScreen.isNotEmpty()
|
||||||
val outcome = when {
|
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}"
|
reached -> "connected, then ${category.label}"
|
||||||
category == Category.NONE -> "ended before video"
|
category == Category.NONE -> "ended before video"
|
||||||
else -> category.label
|
else -> category.label
|
||||||
|
|||||||
Reference in new issue
Block a user