From 06f2e1294b8cc23c2a845c850789a69f5a5fa535 Mon Sep 17 00:00:00 2001 From: David Brazdil Date: Wed, 3 Apr 2019 13:00:55 +0100 Subject: [PATCH] Pass app's data dir to ART Inform ART about the location of the app's data directory when setting up the process. This is part of an optimization that has ART cache verification data into that directory. Test: compiles, boots Bug: 72131483 Change-Id: Ic80526b6ee383733eb5860e66f6c608109d838fb --- core/java/android/app/ActivityThread.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/core/java/android/app/ActivityThread.java b/core/java/android/app/ActivityThread.java index 7cd1b087d9cad..a6f19f4c8f27c 100644 --- a/core/java/android/app/ActivityThread.java +++ b/core/java/android/app/ActivityThread.java @@ -5694,6 +5694,10 @@ public final class ActivityThread extends ClientTransactionHandler { UserHandle.myUserId()); VMRuntime.setProcessPackageName(data.appInfo.packageName); + // Pass data directory path to ART. This is used for caching information and + // should be set before any application code is loaded. + VMRuntime.setProcessDataDirectory(data.appInfo.dataDir); + if (mProfiler.profileFd != null) { mProfiler.startProfiling(); }