Updates to non-SDK interface restrictions in Android 12

Android 12 includes updated lists of restricted non-SDK interfaces based on collaboration with Android developers and the latest internal testing. Whenever possible, we make sure that public alternatives are available before we restrict non-SDK interfaces.

If your app does not target Android 12, some of these changes might not immediately affect you. However, while you can currently use some non-SDK interfaces (depending on your app's target API level), using any non-SDK method or field always carries a high risk of breaking your app.

If you are unsure if your app uses non-SDK interfaces, you can test your app to find out. If your app relies on non-SDK interfaces, you should begin planning a migration to SDK alternatives. Nevertheless, we understand that some apps have valid use cases for using non-SDK interfaces. If you cannot find an alternative to using a non-SDK interface for a feature in your app, you should request a new public API.

List changes for Android 12

The list changes in Android 12 fall into the following categories:

For a complete list of all non-SDK interfaces for Android 12, download the following file:

File: hiddenapi-flags.csv

SHA-256 checksum: 40674ff4291eb268f86561bf687e69dbd013df9ec9531a460404532a4ac9a761

Non-SDK interfaces that are now blocked in Android 12

The following code box lists all of the non-SDK interfaces that were unsupported (greylisted) in Android 11 (API level 30) that are blocked in Android 12. That is, these interfaces belong to the max-target-r (greylist-max-r) list, so your app can only use these interfaces if it targets Android 11 (API level 30) or lower.

Our goal is to make sure that public alternatives are available before we restrict non-SDK interfaces, and we understand that your app might have a valid use case for using these interfaces. If an interface that your app