Skip to content

Conversation

@Kota-Jagadeesh
Copy link
Collaborator

@Kota-Jagadeesh Kota-Jagadeesh commented Jan 4, 2026

Description (required)

This PR refactors the location service handling to resolve a long-standing technical debt "TODO" in ContributionController.

Previously, the ContributionController manually managed its own "Location Off" dialog logic because the shared LocationPermissionsHelper lacked a way to notify callers when a user declined to turn on system location services. This led to redundant code and inconsistent behavior across different screens.

I have:

  • Updated the LocationPermissionCallback interface to include onLocationServiceUnAvailable().
  • Refactored LocationPermissionsHelper to trigger this callback when a user dismisses the location settings dialog.
  • Cleaned up ContributionController by removing redundant dialog logic and using the new callback to gracefully proceed with camera uploads.
  • Implemented the new callback in ExploreMapFragment, NearbyParentFragment, and LocationPickerActivity to ensure the app remains stable and consistent across all location-aware features.

What changes did you make and why?
I moved the UI logic for handling disabled GPS from individual controllers into the shared helper. This ensures that if a user hits "Cancel" on a location prompt, the app responds predictably (showing a toast and allowing manual override) rather than potentially getting stuck or requiring duplicate logic in every fragment.

Tests performed (required)

Tested ProdDebug on Redmi note 13+ with API level 35.

@github-actions
Copy link

github-actions bot commented Jan 4, 2026

✅ Generated APK variants!

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