Skip to content

[geolocator] Fix concurrent getCurrentPosition calls and add getLocationAccuracy - #1220

Open
seungsoo47 wants to merge 3 commits into
flutter-tizen:mainfrom
seungsoo47:upstream-plugins-geolocator-concurrent-current-position
Open

seungsoo47 wants to merge 3 commits into
flutter-tizen:mainfrom
seungsoo47:upstream-plugins-geolocator-concurrent-current-position

Conversation

@seungsoo47

Copy link
Copy Markdown
Contributor

This PR fixes several stability issues in geolocator_tizen and adds support for getLocationAccuracy:

  • Fix getCurrentPosition never completing when it is called again before an earlier call completes.
  • Fix a crash when an unimplemented method such as requestTemporaryFullAccuracy is called.
  • Fix a possible crash when openAppSettings or openLocationSettings is called.
  • Add support for getLocationAccuracy.

…d methods

getCurrentPosition kept a single pair of callbacks, so a call made while
an earlier one was pending replaced them and the earlier call's Future
never completed. Pending requests now join the request in flight and all
complete with the same position or error.

Upstream geolocator_apple had the same problem and fixed it the same way
in Baseflow/flutter-geolocator#1813.

Calling a method the plugin does not implement, such as
getLocationAccuracy, called NotImplemented() on the moved-from result and
crashed the app. Reply through result_ instead.
getLocationAccuracy fell through to NotImplemented, so
Geolocator.getLocationAccuracy() threw MissingPluginException on Tizen.
Tizen has a single location privilege and no approximate-location
mode, so always report LocationAccuracyStatus.precise, as
geolocator_windows does for its high-accuracy mode:
https://github.com/Baseflow/flutter-geolocator/blob/main/geolocator_windows/windows/geolocator_plugin.cpp

The unimplemented-method test now uses requestTemporaryFullAccuracy,
which is iOS-only and still unimplemented. Bump the unreleased version
to 1.2.0 since this adds a feature.
app_settings_manager_ was declared but never created, so openAppSettings
and openLocationSettings called a member function through a null
unique_ptr. This is undefined behavior; it only worked because the
methods do not access any members.
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 23, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-23T10:55:36.347734Z 44cb5dc PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant