When we modify the classes opened by google. The so-called open classes and open APIs are only the scope of javadoc and are not public and private in java. That is to say, it does not matter for source code compilation, it only affects the opening and hiding of classes when javadoc is generated. It is controlled by doc annotation {@ hide. For example, in the Environment class, we have added several member methods, and the following error occurs during compilation:
******************************
You have tried to change the API from what has been previusly approved.
To make these errors go away, you have two choices:
1) You can add "@ hide" javadoc comments to the methods, etc. listed in
Errors abve.
2) You can update current. xml by executing the following command:
Make update-api
To submit the revised current. xml to the main Android repository,
You will need approval.
******************************
However, if the modified class is not open to google, such as RIL and PhoneFactory, this problem will not occur.
Google provides two options:
1. Add the javadoc annotation @ hide before the API or variable you added. However, it should be noted that it is not a simple @ hide or it is enough. These are all incorrect javadoc annotation formats, the standard javadoc is like this and the format variable should be added with {}, so we should write it like this
2. this method or variable appears in the javadoc you want to generate. You must enter make update-api, that is, make update-api PRODUCT-***-eng, however, inputting make PRODUCT-***-eng update-api is problematic because the subsequent update-api will be ignored, in this way, the system automatically writes our new APIs to frameworks/base/API/current. xml file.
The above two solutions can solve the problem of new APIs, which we will often encounter in the future.