新聞中心
這里有您想知道的互聯(lián)網(wǎng)營銷解決方案
Android應用程序進程啟動過程的源代碼分析(七)
從peers.get(index)得到的是一個ZygoteConnection對象,表示一個Socket連接,接下來就是調用ZygoteConnection.runOnce函數(shù)進一步處理了。

上文調用了handleChildProc函數(shù)。
Step 7. ZygoteConnection.handleChildProc
這個函數(shù)定義在frameworks/base/core/java/com/Android/internal/os/ZygoteConnection.java文件中:
- [java] view plaincopyclass ZygoteConnection {
- ......
- private void handleChildProc(Arguments parsedArgs,
- FileDescriptor[] descriptors, PrintStream newStderr)
- throws ZygoteInit.MethodAndArgsCaller {
- ......
- if (parsedArgs.runtimeInit) {
- RuntimeInit.zygoteInit(parsedArgs.remainingArgs);
- } else {
- ......
- }
- }
- ......
- }
由于在前面的Step 3中,指定了"--runtime-init"參數(shù),表示要為新創(chuàng)建的進程初始化運行時庫,因此,這里的parseArgs.runtimeInit值為true,于是就繼續(xù)執(zhí)行RuntimeInit.zygoteInit進一步處理了。
新聞標題:Android應用程序進程啟動過程的源代碼分析(七)
網(wǎng)站路徑:http://www.5511xx.com/article/dpospcg.html


咨詢
建站咨詢
