Skip to content

Fix Android touch input after session recovery - #753

Merged
Kief5555 merged 1 commit into
android-nativefrom
capy/android-touch-session-recovery
Aug 14, 2026
Merged

Fix Android touch input after session recovery#753
Kief5555 merged 1 commit into
android-nativefrom
capy/android-touch-session-recovery

Conversation

@zortos293

Copy link
Copy Markdown
Collaborator

Fixes the Android cursor/controller failure reported by <@700873802065641482> (mezo0077).

What changed

  • Recover with a fresh cloud session immediately when CloudMatch no longer lists the disconnected session, instead of stopping with no input channels. The missing session is not stopped a second time, but its timer anchor is cleared before creating the replacement.
  • Keep each finger's UI-versus-stream ownership fixed from pointer-down until pointer-up, so dragging across measured touch-controller bounds cannot make an active Finger Mouse pointer switch routes mid-gesture.
  • Release held touch-mouse buttons and native-touch contacts before detaching the old stream client, preventing teardown/recreation from carrying an in-flight input state into the next session.
  • Add regression coverage for empty-session recovery and stable pointer ownership.

Diagnostic evidence

The supplied build 84 log reaches healthy streaming with both input channels open, then records signaling EOF, reliable and partially reliable channels closing, ICE disconnecting, 503/404 reconnect attempts, and input drops while no channel exists. CloudMatch subsequently returns zero active sessions and recovery stops with The running session could not be found anymore. The older retained run shows mouse press/release events being consumed locally while neither channel exists. No log event shows a touch gesture causing the transport failure.

Verification

  • ./gradlew testDebugUnitTest --tests com.opencloudgaming.opennow.NativeTouchTest --tests com.opencloudgaming.opennow.InputDiagnosticsTest --tests com.opencloudgaming.opennow.VirtualCursorTest --tests com.opencloudgaming.opennow.StreamResolutionTest
  • ./gradlew assembleDebug
  • ./gradlew lintDebug was also run; it reaches the repository's existing baseline of 40 unrelated errors, beginning at AndroidAppDataReset.kt:45 (Context#getDataDir requires API 24 while minSdk is 23). Changed files add no lint errors.

Visual proof

No screenshot is attached because this fix has no new or changed visual surface: it changes input ownership, teardown, and cloud-session recovery behavior behind the existing stream UI. Reproducing the affected experience requires a real NVIDIA/GFN account, an active cloud stream, and the reporter's intermittent signaling/session failure; this environment has no account credentials, so a screenshot could not honestly demonstrate the behavioral result.

@cursor

cursor Bot commented Aug 13, 2026

Copy link
Copy Markdown

Bugbot is not enabled for your account, so this pull request was not reviewed.

Enable Bugbot in the Cursor dashboard to get automatic reviews on future PRs.

@coderabbitai

coderabbitai Bot commented Aug 13, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 7a52a390-374f-4dea-a5b3-febcec7beff6

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@Kief5555
Kief5555 merged commit a7ed673 into android-native Aug 14, 2026
11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants