Skip to content

[Deprecation] Updates for Android 15/16 #4626

Open
@nzayatz14

Description

@nzayatz14

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.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions