-
Notifications
You must be signed in to change notification settings - Fork 3k
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: prevents infinite recursion when getting the location permission #1813
Conversation
@@ -26,6 +26,8 @@ | |||
import android.widget.FrameLayout; | |||
import android.widget.TextView; | |||
|
|||
import androidx.activity.result.ActivityResultLauncher; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we need those imports?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice catch. Those were added when I looked into using the newer permission request flow, but that requires API 24
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. I was able to reproduce the issue on the previous code.
# [1.14.0](v1.13.0...v1.14.0) (2025-01-14) ### Bug Fixes * add dynamic key values to secrets.properties in idx template ([#1814](#1814)) ([46abfae](46abfae)) * always use secrets.properties for storing the API keys ([#1812](#1812)) ([561e829](561e829)) * Exports sample activities so they can be run directly ([#1808](#1808)) ([206cdcf](206cdcf)) * fixed release config ([#1944](#1944)) ([6b62127](6b62127)) * fixed release step ([#1770](#1770)) ([cb53eb4](cb53eb4)) * fixed secrets in wearable module ([#1788](#1788)) ([5ea1951](5ea1951)) * import rememberMarkerState and use the marker state correctly ([#1787](#1787)) ([5095437](5095437)) * prevents infinite recursion when getting the location permission ([#1813](#1813)) ([5790ff2](5790ff2)) * Re-add MarkerDemoActivity in Kotlin sample ([#1916](#1916)) ([66db0fa](66db0fa)) * stop memory leak in CoordTileProvider ([#1929](#1929)) ([55c6297](55c6297)) * Update emulator host in dev.nix for IDX ([#1893](#1893)) ([26e5bd3](26e5bd3)) * Updates secrets in app-level build.gradle.kts files to set secrets.properties as propertiesFileName. ([#1785](#1785)) ([dcec2ce](dcec2ce)) * using rememberMarkerState instead of MarkerState ([#1768](#1768)) ([6007cc8](6007cc8)) ### Features * Introduces an idx folder containing an IDX template, enabling users to open Android tutorials directly in the IDX IDE. ([#1757](#1757)) ([b32a515](b32a515)) * tooling modernization ([#1753](#1753)) ([42f3887](42f3887))
🎉 This PR is included in version 1.14.0 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
The code was repeatedly requesting the access fine location permission in an infinite recursion loop which resulted in the app crashing. This removes the unnecessary call to request the permission in the updateLocationUI method.