From f19c9638ddc6678b9ac28afc4c83189d4fe2fd62 Mon Sep 17 00:00:00 2001 From: Calin Juravle Date: Thu, 10 Dec 2015 17:32:15 +0000 Subject: [PATCH] Pass app's code paths to the runtime The runtime needs the application's main code paths so it know for which dex files to record the profile. Bug:26080105 Change-Id: I5f2cb5c140aa6893ac78bc0d5897e33764569e5b --- core/java/android/app/ActivityThread.java | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/core/java/android/app/ActivityThread.java b/core/java/android/app/ActivityThread.java index 83d41527650fa..a2ef4104d0154 100644 --- a/core/java/android/app/ActivityThread.java +++ b/core/java/android/app/ActivityThread.java @@ -119,6 +119,7 @@ import java.lang.ref.WeakReference; import java.net.InetAddress; import java.text.DateFormat; import java.util.ArrayList; +import java.util.Collections; import java.util.List; import java.util.Locale; import java.util.Map; @@ -814,8 +815,13 @@ public final class ActivityThread { // Tell the VMRuntime about the application, unless it is shared // inside a process. if (!sharable) { + final List codePaths = new ArrayList<>(); + codePaths.add(appInfo.sourceDir); + if (appInfo.splitSourceDirs != null) { + Collections.addAll(codePaths, appInfo.splitSourceDirs); + } VMRuntime.registerAppInfo(appInfo.packageName, appInfo.dataDir, - appInfo.processName); + codePaths.toArray(new String[codePaths.size()])); } }