From 89dd28bd62a72cdb8e7ce488019cc51100844856 Mon Sep 17 00:00:00 2001 From: Seb3thehacker Date: Tue, 27 Oct 2026 14:30:14 -0700 Subject: [PATCH] protocol: ask for the car's screen with reason unknown, not 'phone screen off' --- .../main/java/app/seb3thehacker/gearslip/GearslipRunner.kt | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/gearslip/src/main/java/app/seb3thehacker/gearslip/GearslipRunner.kt b/gearslip/src/main/java/app/seb3thehacker/gearslip/GearslipRunner.kt index 37b4f5c..5e9a3a0 100644 --- a/gearslip/src/main/java/app/seb3thehacker/gearslip/GearslipRunner.kt +++ b/gearslip/src/main/java/app/seb3thehacker/gearslip/GearslipRunner.kt @@ -1006,9 +1006,11 @@ class GearslipRunner( "${videoConfigs.getOrNull(selectedConfigIndex ?: -1)?.resolutionName ?: "?"} " + "(head unit offered ${offered.size}), max_unacked=$maxUnacked", ) - // VideoFocusRequestNotification { mode = 2; reason = 3 } + // VideoFocusRequestNotification { mode = 2; reason = 3 }. Reason 1 means "the phone's + // screen is off", which a 2020 Civic may have taken as a reason to keep its own + // screen (issue #43); 0 is UNKNOWN. val focus = Protobuf.varintField(2, VIDEO_FOCUS_PROJECTED.toLong()) + - Protobuf.varintField(3, 1L) + Protobuf.varintField(3, 0L) send(MSG_VIDEO_FOCUS_REQUEST, focus, encrypted = true, channel = videoChannelId) log.i("-> VideoFocusRequest(mode=PROJECTED)") }