We're probably just a few months away from the first developer preview release of Android P, but there are some hints of what Google's cooking in AOSP. According to a report at XDA, Google might be planning a move that'll upset some developers. New commits suggest Google will remove access to unofficial APIs in the next big Android release.

Android has a great many APIs for developers to use, but there are also some hidden APIs that aren't technically part of the SDK. Developers sometimes use these to enable advanced features or as shortcuts, but they can cause issues when Android updates roll out. Undocumented APIs can also be used to engage in activities that negatively impact system stability or performance, which is bad for users.

This commit was eventually split into three smaller commits with the same gist.

Based on the happenings in AOSP, Google might block apps from accessing the classes, methods, and fields marked with "@hide" in AOSP. A new build tool called hiddenapi modifies the access flags of all signatures that appear on a black or graylist, making hidden APIs inaccessible to developers. Apps that try to use them on Android P would fail to work. That list would also be used in CTS to ensure hidden APIs are not discoverable on a device.

In another commit, Google developers talk about adding a system for suggesting alternatives to developers trying to access hidden APIs. None of this is set in stone yet, and most developers using hidden APIs don't abuse them. In most instances, developers should be able to find alternatives, but some apps might never be the same.

Source: XDA