[android] Fix the crosshair (PICK_POINT) API #8910

Merged
root merged 1 commit from rt-android-pickpoint-fix into master 2024-08-11 12:07:04 +00:00

1 commit

Author SHA1 Message Date
ffb8b4a544 [android] Fix the crosshair (PICK_POINT) API
It appears that the new streamlined logic introduced in c90c6bb
"Fix SecurityException when importing bookmarks" is not consistently
reliable across all scenarios, as reported in #8350.

Steps to reproduce:

1. Remove all versions of Organic Maps from the device except one.
   The #8350 issue doesn't reproduce without this step.
2. Run PickPoint example from organicmaps/api-android repository.
3. The API call will always return RESULT_CANCELED.

Installing one more version of Organic Maps (Debug, Beta, Web, etc.)
alongside the existing version fixes the API to return RESULT_OK.
Debugging shows that FLAG_ACTIVITY_FORWARD_RESULT is not getting
set in this scenario.

Revert partially c90c6bb "Fix SecurityException ..." to restore
ActivityResultLauncher chain and re-add EXTRA_PICK_POINT, but
keep the idea of forwarding of the original intent.

Fixes #8350

Signed-off-by: Roman Tsisyk <roman@tsisyk.com>
2024-08-10 11:32:47 +01:00