Skip to content

Issue #5996 - Fix Android Studio warnings in LocationPickerActivity.kt #6026

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

Merged

Conversation

savsch
Copy link
Contributor

@savsch savsch commented Dec 12, 2024

Description (required)

This fixes Android Studio warnings in app/src/main/java/fr/free/nrw/commons/LocationPicker/LocationPickerActivity.kt, as described in #5996


Note that just one weak warning remains:

Package name 'fr.free.nrw.commons.LocationPicker' part should not start with an uppercase letter

I didn't try to fix this because I believe that renaming the package falls outside of the scope of this issue (#5996). I request the reviewer to clarify whether this is the case or not.

Edit: fixed. No warning or weak warning remains.


The changes made include:

  • Replacing deprecated Html.fromHtml(String) call with HtmlCompat.fromHtml(String, HtmlCompat.FROM_HTML_MODE_LEGACY)
  • Replacing deprecated getParcelableExtra method calls (for Intent and Bundle) with corresponding calls in IntentCompat and BundleCompat.
  • Replacing deprecated getZoomLevel call with getZoomLevelDouble (for org.osmdroid.views.MapView)
  • Reformatting lines longer than 100 characters so as to comply with the code style.
  • Renamed fr.free.nrw.commons.LocationPicker to fr.free.nrw.commons.locationpicker.

Tests performed (required)

Tested BetaDebug on Medium Phone (AVD) with API level 34 and on a physical device with API Level 33. Also made sure LocationPickerActivityUnitTests pass.

Copy link
Member

@nicolas-raoul nicolas-raoul left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Still working great, and unit tests passing. Thanks!

@nicolas-raoul nicolas-raoul merged commit cb00760 into commons-app:main Dec 13, 2024
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants