文件路径:frameworks\base\services\core\java\com\android\server\power\ShutdownThread.java 在beginShutdownSequence()方法中: private static void beginShutdownSequence(Context context) { // throw up an indeterminate system dialog to indicate radio is // shutting
下面是简单的流程图,从Java到kernel层. ShutdownThread.java文件 stop playing music,因为后面可能要playing shutdown music. 代码如下:(我在Android6.0上沒有看到調用requestAudioFocus的代碼) private static void beginShutdownSequence(Context context) { .... //acquire audio focus to make the other