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

[Deprecation] Updates for Android 15/16 #4626

Open
nzayatz14 opened this issue Feb 26, 2025 · 3 comments
Open

[Deprecation] Updates for Android 15/16 #4626

nzayatz14 opened this issue Feb 26, 2025 · 3 comments
Assignees

Comments

@nzayatz14
Copy link

Description:

When uploading my app to the Google Play Console, I encountered warnings regarding deprecated APIs for edge-to-edge display on Android 15. The console reports that my app uses the following deprecated APIs or parameters:

android.view.Window.setDecorFitsSystemWindows
android.view.Window.setStatusBarColor
android.view.Window.setNavigationBarColor

These deprecated calls originate from internal invocations within the Material Components library at:

androidx.core.view.WindowCompat$Api35Impl.a // this one not directly related to the material library
com.google.android.material.bottomsheet.BottomSheetDialog.onCreate
com.google.android.material.datepicker.MaterialDatePicker.X
com.google.android.material.sidesheet.SheetDialog.onCreate

It appears that these methods, now deprecated in Android 15, are still being used internally by the Material Components library, which in turn causes these warnings even though my own code does not explicitly invoke them.

Source code:

I'm sure that these code snippets are scattered throughout the codebase, but those were the items that caused Google Play to show warnings for my app. The one for the BottomSheedDialog can be seen here for example.

Android API version: Android API version here

Android 15

Material Library version:

v1.12.0

Device:

I have not seen this warning in Android Studio, only in the Google Play Console after uploading my app.

@drchen
Copy link
Contributor

drchen commented Feb 28, 2025

Hey Hunter, this looks like a general issue we should fix? Are we targeting Android 15 now?

@michael-winkler
Copy link
Contributor

See here also:
#4507

@SMH17
Copy link

SMH17 commented Mar 13, 2025

It is pretty ironic that Google Play complains about stuff in Google own libraries despite updated to latest available. The maintainers of the library could at least mitigate the issue enwrapping calls that aren't supposed to work at all with Android 35+, with a conditional OS version check, so that Play static code analysis doesn't detect unsupported calls, that despite not used by app will be merged from this library.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants