Skip to content

Conversation

@latekvo
Copy link
Member

@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 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
@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
Member 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