Skip to content

USB-C port: drop a delayed state change after a newer one - #489

Open
abhinav-jhanwar wants to merge 1 commit into
GrapheneOS:17from
abhinav-jhanwar:usb-port-delayed-change
Open

abhinav-jhanwar wants to merge 1 commit into
GrapheneOS:17from
abhinav-jhanwar:usb-port-delayed-change

Conversation

@abhinav-jhanwar

@abhinav-jhanwar abhinav-jhanwar commented Nov 7, 2026 •

Copy link
Copy Markdown

Going from Charging-only to On disables the ports and enables them 1.5 s later. A change to Off within that time is overridden by the delayed enable. So, data comes back and deny_new_usb2 goes to 0 while the setting shows Off.

Reproduced on a Pixel 8a with 2026110200: On and Off 0.96 s apart, then ports_enabled 0.55 s after Off. The delayed task now also checks that no newer port state change was made.

Steps to reproduce:

  1. Set USB to charging only mode and wait around 10 seconds.
  2. Set it to On.
  3. Immediately set it Off.

The USB is enabled even though the setting is set to Off.

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.

1 participant