这是indexloc提供的服务,不要输入任何密码
Skip to content

Conversation

@TomoBossi
Copy link
Contributor

Hello, feel free to review and make changes :)

This fixes an issue where having both ORIENTATION and DEVICE_ORIENTATION sensors makes it impossible to select ORIENTATION with the -s flag, as noted here: #570

It should also help prevent similar issues.

Previously, one sensor name is a substring of another sensor name (like `ORIENTATION` and `DEVICE_ORIENTATION`), then the first matched sensor in available sensors list would get registered, depending on order of sensors. Now we use the shortest match for the requested sensor in the available sensors list, the shortest being an exact match if requested sensor is passed exactly (ignoring case).

Closes termux#570
@agnostic-apollo
Copy link
Member

Looks good, thanks.

@agnostic-apollo agnostic-apollo merged commit d5da717 into termux:master Mar 15, 2025
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