When we use Eclipse for Android development, we use the SDK provided in ADT, which contains no @hide functions and variables. Because Android for compatibility, security and other reasons, when the SDK is provided, these functions are hidden. However, many times, we need to use these functions, so we need to manually add the Android SDK. For example, when we use Audiomanager, we can call Isstreammute (int streamtype) When we need to see if some kind of streamtype is mute, but because it is @hide, we need to introduce our own SDK To compile the pass.
When the ANDROID system compiles, the "include $ (build_java_library)" is compiled when the $android_source_base/out/target/common/obj/java_ Libraries generates intermediate files, which can be found when we need to use some class libraries.
isstreammute (int streamtype) in Framework.jar, we are from Out/target/common/obj/java_libraries/framework_ Intermediates, copy the Classes.jar to local and rename it to Framework.jar.
Right-click Project->properties->java Build path->libraries->add External JAR in eclipse
Click order and Export to Framework.jar
Now, we can use the isstreammute (int streamtype) method in Audiomanager.
Using the @hide function in the SDK in eclipse