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

[sensors][android] Fix crash when using DeviceMotion module #28839

Merged
merged 1 commit into from
May 14, 2024

Conversation

behenate
Copy link
Member

Why

Currently DeviceMotion module crashes with

Tried to obtain display from a Context not associated with  one.

Fixes #28820

How

The orientation is now obtained from the current activity instead of reactContext.applicationContext

Test Plan

Tested in BareExpo

@expo-bot expo-bot added the bot: suggestions ExpoBot has some suggestions label May 14, 2024
@expo-bot
Copy link
Collaborator

expo-bot commented May 14, 2024

The Pull Request introduced fingerprint changes against the base commit: abf6b83

Fingerprint diff
[
  {
    "type": "dir",
    "filePath": "../../packages/expo-sensors/android",
    "reasons": [
      "expoAutolinkingAndroid"
    ],
    "hash": "0f86ac256489e345fffd780ea1f873e4db8c17ca"
  }
]

Generated by PR labeler 🤖

@behenate behenate force-pushed the @behenate/sdk51/sensors-crash-fix branch from 868a643 to 7e51859 Compare May 14, 2024 14:51
@expo-bot expo-bot added bot: passed checks ExpoBot has nothing to complain about and removed bot: suggestions ExpoBot has some suggestions labels May 14, 2024
@behenate behenate marked this pull request as ready for review May 14, 2024 14:52
@behenate behenate requested a review from lukmccall as a code owner May 14, 2024 14:52
@brentvatne brentvatne merged commit 6158f5d into main May 14, 2024
20 checks passed
@brentvatne brentvatne deleted the @behenate/sdk51/sensors-crash-fix branch May 14, 2024 23:54
@brentvatne brentvatne added the published Changes from the PR have been published to npm label May 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bot: fingerprint changed bot: passed checks ExpoBot has nothing to complain about published Changes from the PR have been published to npm
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[SDK 51] expo-sensors 13.0.6 crash
4 participants