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 'device.locationStatus' on Android 12+ #1683

Merged
merged 1 commit into from
May 10, 2022

Conversation

lemnik
Copy link
Contributor

@lemnik lemnik commented May 10, 2022

Goal

Report an accurate device.locationStatus value on devices running Android 12 and onwards.

Changeset

Use LocationManager.isLocationEnabled on Android 12+ instead of Settings.Secure.LOCATION_PROVIDERS_ALLOWED. While isLocationEnabled has been available since Android 9 we will continue to report using LOCATION_PROVIDERS_ALLOWED for all versions before Android 12 so that the exact meaning remains the same.

Testing

Manually tested

@lemnik lemnik force-pushed the PLAT-8430/fix-location-status branch 2 times, most recently from 868ad37 to 9968193 Compare May 10, 2022 09:08
@bugsnagbot
Copy link
Collaborator

Android notifier sizes

Format Size impact of Bugsnag (kB) Size impact of Bugsnag when Minified (kB)
APK 0.0 0.0
arm64_v8a 0.0 0.0
armeabi_v7a 0.0 0.0
x86 0.0 0.0
x86_64 0.0 0.0

Generated by 🚫 Danger

@lemnik lemnik force-pushed the PLAT-8430/fix-location-status branch from 9968193 to 04eb1fc Compare May 10, 2022 15:59
@lemnik lemnik merged commit 28359da into next May 10, 2022
@lemnik lemnik deleted the PLAT-8430/fix-location-status branch May 10, 2022 16:26
@lemnik lemnik mentioned this pull request May 11, 2022
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.

4 participants