Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix default Sensor interval causing a security exception #5812

Merged
merged 6 commits into from
Mar 25, 2024

Conversation

latekvo
Copy link
Contributor

@latekvo latekvo commented Mar 20, 2024

Summary

Currently default magnetic sampling interval equals 2ms, which triggers a HIGH_SAMPLE_RATE security exception.
This fix defaults the probing interval to 8ms.

Note: 'auto' setting defaults to -1, which is then replaced by 2.

Test plan

Download a new emulator on Android Studio - I'm using Pixel 8 UpsideDownCake
Launch the magnetic sensor example before, and after applying this patch.

@latekvo latekvo requested a review from piaskowyk March 20, 2024 09:39
@tomekzaw tomekzaw changed the title fixed default Magnetic Sensor interval causing a security exception Fix default Magnetic Sensor interval causing a security exception Mar 21, 2024
latekvo and others added 3 commits March 21, 2024 16:52
Co-authored-by: Tomek Zawadzki <tomasz.zawadzki@swmansion.com>
Co-authored-by: Tomek Zawadzki <tomasz.zawadzki@swmansion.com>
@latekvo latekvo requested a review from tomekzaw March 22, 2024 15:03
@latekvo latekvo added this pull request to the merge queue Mar 25, 2024
Merged via the queue into main with commit 9e79766 Mar 25, 2024
9 checks passed
@latekvo latekvo deleted the @latekvo/fix_magnetic_sensor_exception branch March 25, 2024 20:50
@latekvo latekvo changed the title Fix default Magnetic Sensor interval causing a security exception Fix default Sensor interval causing a security exception Mar 27, 2024
@latekvo
Copy link
Contributor Author

latekvo commented Mar 27, 2024

This PR fixed both the magnetic and the accelerometer sensor.
Other sensors are not affected.

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.

3 participants