Detailed explanation of how to use @hide's API on Android
I wanted to modify the code (/packages/apps/Music) this morning.
Change AudioManager.STREAM_MUSIC to AudioManager.STREAM_TTS.
Discover (/frameworks//java/Android/media)
/* @hide The audio stream for text to speech (TTS) */ public static final int STREAM_TTS = 11;
(/frameworks//java/android/media)
/** @hide The audio stream for text to speech (TTS) */ public static final int STREAM_TTS = AudioSystem.STREAM_TTS;
It's a hidden API. I searched it and found that it's enough to delete the comments.
When compiling, it is found that the compilation cannot be passed, and then it is found that it needs to execute make update-api, and then make again. This way you can compile and pass.
After adding the system API or modifying the @hide API, you need to execute make update-api to update the API, and then make it.
If you have any questions, please leave a message or go to the community of this site to exchange and discuss. Thank you for reading. I hope it can help you. Thank you for your support for this site!