Merge "Don't preload into nonexistent zygote"

This commit is contained in:
Hans Boehm
2022-04-20 19:14:16 +00:00
committed by Gerrit Code Review

View File

@@ -1382,8 +1382,9 @@ public final class SystemServer implements Dumpable {
Slog.i(TAG, SECONDARY_ZYGOTE_PRELOAD);
TimingsTraceAndSlog traceLog = TimingsTraceAndSlog.newAsyncLog();
traceLog.traceBegin(SECONDARY_ZYGOTE_PRELOAD);
if (!Process.ZYGOTE_PROCESS.preloadDefault(Build.SUPPORTED_32_BIT_ABIS[0])) {
Slog.e(TAG, "Unable to preload default resources");
String[] abis32 = Build.SUPPORTED_32_BIT_ABIS;
if (abis32.length > 0 && !Process.ZYGOTE_PROCESS.preloadDefault(abis32[0])) {
Slog.e(TAG, "Unable to preload default resources for secondary");
}
traceLog.traceEnd();
} catch (Exception ex) {