Android: Fix geolocation help dialog display logic - #1302
Conversation
There was a problem hiding this comment.
Pull request overview
This PR adjusts Android geolocation (ACCESS_MEDIA_LOCATION) permission prompting behavior in ReportListActivity to avoid showing the geolocation help dialog in situations where the permission prompt is blocked, and to alter when the explanatory dialog is shown.
Changes:
- Removes the “geolocation help” dialog and its trigger path from
onRequestPermissionsResult. - Updates
requestMediaLocationPermission()to show the geolocation summary dialog only whenshouldShowRequestPermissionRationale(...)returns true; otherwise it directly callsrequestPermissions(...).
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| if (shouldShowRequestPermissionRationale(android.Manifest.permission.ACCESS_MEDIA_LOCATION)) { | ||
| MaterialAlertDialogBuilder(this) | ||
| .setTitle(R.string.permissions_geolocation_title) | ||
| .setMessage(R.string.permissions_geolocation_summary) | ||
| .setPositiveButton(android.R.string.ok) { _, _ -> |
Signed-off-by: Maxime Gervais <gervais.maxime@gmail.com>
ef6260b to
2381fa1
Compare
cjee21
left a comment
There was a problem hiding this comment.
Works fine. Seems some users do not really understand Android's permission system and may 'complain' that MediaInfo 'bypasses' permission by still being able to access media after denying permission (there is a review on Google Play about no permissions asked previously) but there is no way to fully satisfy everyone.
Fixes #1301
Snapshot