Loading services/core/java/com/android/server/am/ProcessList.java +11 −5 Original line number Original line Diff line number Diff line Loading @@ -2377,6 +2377,7 @@ public final class ProcessList { } } final Process.ProcessStartResult startResult; final Process.ProcessStartResult startResult; boolean regularZygote = false; if (hostingRecord.usesWebviewZygote()) { if (hostingRecord.usesWebviewZygote()) { startResult = startWebView(entryPoint, startResult = startWebView(entryPoint, app.processName, uid, uid, gids, runtimeFlags, mountExternal, app.processName, uid, uid, gids, runtimeFlags, mountExternal, Loading @@ -2396,12 +2397,8 @@ public final class ProcessList { app.getDisabledCompatChanges(), pkgDataInfoMap, allowlistedAppDataInfoMap, app.getDisabledCompatChanges(), pkgDataInfoMap, allowlistedAppDataInfoMap, false, false, false, false, new String[]{PROC_START_SEQ_IDENT + app.getStartSeq()}); new String[]{PROC_START_SEQ_IDENT + app.getStartSeq()}); if (Process.createProcessGroup(uid, startResult.pid) < 0) { Slog.e(ActivityManagerService.TAG, "Unable to create process group for " + app.processName + " (" + startResult.pid + ")"); } } else { } else { regularZygote = true; startResult = Process.start(entryPoint, startResult = Process.start(entryPoint, app.processName, uid, uid, gids, runtimeFlags, mountExternal, app.processName, uid, uid, gids, runtimeFlags, mountExternal, app.info.targetSdkVersion, seInfo, requiredAbi, instructionSet, app.info.targetSdkVersion, seInfo, requiredAbi, instructionSet, Loading @@ -2410,6 +2407,15 @@ public final class ProcessList { allowlistedAppDataInfoMap, bindMountAppsData, bindMountAppStorageDirs, allowlistedAppDataInfoMap, bindMountAppsData, bindMountAppStorageDirs, new String[]{PROC_START_SEQ_IDENT + app.getStartSeq()}); new String[]{PROC_START_SEQ_IDENT + app.getStartSeq()}); } } if (!regularZygote) { // webview and app zygote don't have the permission to create the nodes if (Process.createProcessGroup(uid, startResult.pid) < 0) { Slog.e(ActivityManagerService.TAG, "Unable to create process group for " + app.processName + " (" + startResult.pid + ")"); } } // This runs after Process.start() as this method may block app process starting time // This runs after Process.start() as this method may block app process starting time // if dir is not cached. Running this method after Process.start() can make it // if dir is not cached. Running this method after Process.start() can make it // cache the dir asynchronously, so zygote can use it without waiting for it. // cache the dir asynchronously, so zygote can use it without waiting for it. Loading Loading
services/core/java/com/android/server/am/ProcessList.java +11 −5 Original line number Original line Diff line number Diff line Loading @@ -2377,6 +2377,7 @@ public final class ProcessList { } } final Process.ProcessStartResult startResult; final Process.ProcessStartResult startResult; boolean regularZygote = false; if (hostingRecord.usesWebviewZygote()) { if (hostingRecord.usesWebviewZygote()) { startResult = startWebView(entryPoint, startResult = startWebView(entryPoint, app.processName, uid, uid, gids, runtimeFlags, mountExternal, app.processName, uid, uid, gids, runtimeFlags, mountExternal, Loading @@ -2396,12 +2397,8 @@ public final class ProcessList { app.getDisabledCompatChanges(), pkgDataInfoMap, allowlistedAppDataInfoMap, app.getDisabledCompatChanges(), pkgDataInfoMap, allowlistedAppDataInfoMap, false, false, false, false, new String[]{PROC_START_SEQ_IDENT + app.getStartSeq()}); new String[]{PROC_START_SEQ_IDENT + app.getStartSeq()}); if (Process.createProcessGroup(uid, startResult.pid) < 0) { Slog.e(ActivityManagerService.TAG, "Unable to create process group for " + app.processName + " (" + startResult.pid + ")"); } } else { } else { regularZygote = true; startResult = Process.start(entryPoint, startResult = Process.start(entryPoint, app.processName, uid, uid, gids, runtimeFlags, mountExternal, app.processName, uid, uid, gids, runtimeFlags, mountExternal, app.info.targetSdkVersion, seInfo, requiredAbi, instructionSet, app.info.targetSdkVersion, seInfo, requiredAbi, instructionSet, Loading @@ -2410,6 +2407,15 @@ public final class ProcessList { allowlistedAppDataInfoMap, bindMountAppsData, bindMountAppStorageDirs, allowlistedAppDataInfoMap, bindMountAppsData, bindMountAppStorageDirs, new String[]{PROC_START_SEQ_IDENT + app.getStartSeq()}); new String[]{PROC_START_SEQ_IDENT + app.getStartSeq()}); } } if (!regularZygote) { // webview and app zygote don't have the permission to create the nodes if (Process.createProcessGroup(uid, startResult.pid) < 0) { Slog.e(ActivityManagerService.TAG, "Unable to create process group for " + app.processName + " (" + startResult.pid + ")"); } } // This runs after Process.start() as this method may block app process starting time // This runs after Process.start() as this method may block app process starting time // if dir is not cached. Running this method after Process.start() can make it // if dir is not cached. Running this method after Process.start() can make it // cache the dir asynchronously, so zygote can use it without waiting for it. // cache the dir asynchronously, so zygote can use it without waiting for it. Loading