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

Continue upgrading some deprecated methods #883

Merged
merged 5 commits into from Aug 14, 2023
Merged

Conversation

HollowMan6
Copy link
Collaborator

@HollowMan6 HollowMan6 commented Jul 31, 2023

  • Remove deprecated methods less than API 24
  • Modernize OnSystemUiVisibilityChangeListener deprecated
  • Modernize deprecated dispatchConfigurationChanged(Configuration)
  • Modernize deprecated AsyncTask
  • Modernize deprecated getConnectionInfo() in WifiInfo

Resolves #822
Resolves #801
Resolves #802

@HollowMan6 HollowMan6 force-pushed the CONNECTIVITY_ACTION branch 4 times, most recently from c2a6ce1 to 18066c1 Compare August 4, 2023 15:05
Copy link
Member

@svillar svillar left a comment

Choose a reason for hiding this comment

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

Good job! As mentioned in an inline comment, I think we should remove the first commit from this series and land the rest of them that are ready.

Since our min API is 24 currently

Signed-off-by: Songlin Jiang <sjiang@igalia.com>
Have FragmentHostCallback implement
androidx.core.content.OnConfigurationChangedProvider
to automatically dispatch configuration changes to fragments

Resolves #822

Signed-off-by: Songlin Jiang <sjiang@igalia.com>
AsyncTask class was deprecated in API level 30.
Use the standard java.util.concurrent to replace it.

Resolves #801

Signed-off-by: Songlin Jiang <sjiang@igalia.com>
WifiInfo.getConnectionInfo() was deprecated in API level 31.
Starting with Build.VERSION_CODES#S, WifiInfo retrieval is moved
to ConnectivityManager API surface. WifiInfo is attached in
NetworkCapabilities#getTransportInfo() which is available via callback in
NetworkCallback#onCapabilitiesChanged(Network, NetworkCapabilities)
or on-demand from ConnectivityManager#getNetworkCapabilities(Network).

Refer to https://stackoverflow.com/a/73504558

Resolves #802

Signed-off-by: Songlin Jiang <sjiang@igalia.com>
@HollowMan6
Copy link
Collaborator Author

I have moved the original first commit into a separate PR: #906

That commit should be correct, as I have tested it. Wolvic can correctly tell the user that the network has disconnected or reconnected with that change.

@svillar svillar merged commit a3818e3 into main Aug 14, 2023
7 checks passed
@svillar svillar deleted the CONNECTIVITY_ACTION branch August 14, 2023 10:39
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