Skip to content
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

ANDROID: Remove deprecation warnings #5754

Merged
merged 9 commits into from
May 1, 2024

Conversation

lephilousophe
Copy link
Member

This is a bunch of commits which remove deprecated warnings mainly by isolating code inside its own function in a class dedicated to compatibility shims.
There is also some API changes to determine if connection is limited (metered) and to make the application immersive.

This has been tested on API level 34 (U).
I will test later on API levels 29 (Q) and 19 (Kit Kat).
I could test on 16 (Jelly Bean) with an emulator too.

Copy link
Member

@sev- sev- left a comment

Choose a reason for hiding this comment

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

Looks good to me

@lephilousophe
Copy link
Member Author

I just tested on API levels 29 (Q) and 19 (Kit Kat) and it works OK.
I fixed some typos.

Use ConnectivityManager instead:
- it's more accurate
- it has been available since API level 16 which is the minimum we
  require
- it removes a deprecation warning
It's kind of based on Androidx but is simpler and goes up to Jelly Bean.
This removes a bunch of warnings.
We don't support something like Honeycomb anymore
This allows to remove deprecation warning on a limited part of code
We expect the array to be of even size so don't add the external data
title if there is no external data mount point
@lephilousophe
Copy link
Member Author

I just tested on emulated Jelly Bean.
I couldn't test the isConnectionLimited call as the emulator doesn't provide a Wi-Fi but everything else works.
I added a fix for a segfault when no SD card was present.

@lephilousophe lephilousophe merged commit 9c681dd into scummvm:master May 1, 2024
7 of 8 checks passed
@lephilousophe lephilousophe deleted the android-deprecated branch May 1, 2024 09:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants