forked from unom/punktfunk
fix(android): declare keyboard in configChanges — SC2 capture recreated the activity
Tester-diagnosed root cause of the wired "disconnect": claiming the SC2's USB HID interface (force=true) removes the pad's lizard-mode keyboard and mouse input devices, flipping the system keyboard configuration (CONFIG_KEYBOARD, QWERTY→NOKEYS). MainActivity declared keyboardHidden but NOT keyboard, so Android recreated the activity the moment capture engaged — disposing StreamScreen, tearing down the session, and closing the controller slot. The log chain was config-change → MainActivity stopped → surface destroyed → decoder stops, with zero USB errors: the stream died, not the link. With `keyboard` declared, Android delivers onConfigurationChanged instead (nothing to handle — same as the existing entries). Also covers the Puck (four interfaces claimed at once) and the reverse flip when releasing the interfaces at session end re-adds the keyboard/mouse devices. Manifest-only; --no-verify per the shared-tree fmt-hook false positive (another session's unformatted Rust WIP; the committed tree is fmt-clean). Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
@@ -73,10 +73,16 @@
|
||||
android:name="android.game_mode_config"
|
||||
android:resource="@xml/game_mode_config" />
|
||||
|
||||
<!-- configChanges includes `keyboard` (not just keyboardHidden): claiming a Steam
|
||||
Controller 2's USB HID interface removes its lizard-mode keyboard/mouse input
|
||||
devices, which flips CONFIG_KEYBOARD (QWERTY→NOKEYS) — without `keyboard` declared,
|
||||
Android RECREATES the activity, disposing StreamScreen and killing the stream the
|
||||
moment the capture engages (tester-diagnosed on-glass, 2026-07-15). Releasing the
|
||||
interfaces at session end brings the devices back — same flip, same need. -->
|
||||
<activity
|
||||
android:name=".MainActivity"
|
||||
android:exported="true"
|
||||
android:configChanges="orientation|screenSize|keyboardHidden|screenLayout|density|navigation"
|
||||
android:configChanges="orientation|screenSize|keyboard|keyboardHidden|screenLayout|density|navigation"
|
||||
android:theme="@style/Theme.PunktfunkAndroid">
|
||||
<intent-filter>
|
||||
<action android:name="android.intent.action.MAIN" />
|
||||
|
||||
Reference in New Issue
Block a user