summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Calin Juravle <calin@google.com> 2016-01-13 16:51:36 -0800
committer Calin Juravle <calin@google.com> 2016-01-19 11:44:35 -0800
commit2abb4acd8c10452c4ba2cb0a4703273d8ff8bfc0 (patch)
tree509470007c1f30d77e4428f3529ca02cf48d8fbb
parentdb4a79a5d7d348e9d2286d95d4e5a59dd484456f (diff)
Enable profile support for apps with shared runtime
Bug: 26080105 Change-Id: I3ca8fc1d2c69ab31075947a332643cb53c17be5d
-rw-r--r--core/java/android/app/ActivityThread.java37
1 files changed, 0 insertions, 37 deletions
diff --git a/core/java/android/app/ActivityThread.java b/core/java/android/app/ActivityThread.java
index 5ce13634a578..d087417a8f69 100644
--- a/core/java/android/app/ActivityThread.java
+++ b/core/java/android/app/ActivityThread.java
@@ -4724,12 +4724,6 @@ public final class ActivityThread {
return;
}
final ApplicationInfo appInfo = loadedApk.getApplicationInfo();
- if (isSharingRuntime(appInfo)) {
- // If sharing is enabled we do not have a unique application
- // in a process and therefore cannot rely on the package
- // name inside the runtime.
- return;
- }
final List<String> codePaths = new ArrayList<>();
if ((appInfo.flags & ApplicationInfo.FLAG_HAS_CODE) != 0) {
codePaths.add(appInfo.sourceDir);
@@ -4772,37 +4766,6 @@ public final class ActivityThread {
codePaths.toArray(new String[codePaths.size()]));
}
- /*
- * Two possible indications that this package could be
- * sharing its runtime with other packages:
- *
- * 1) the sharedUserId attribute is set in the manifest,
- * indicating a request to share a VM with other
- * packages with the same sharedUserId.
- *
- * 2) the application element of the manifest has an
- * attribute specifying a non-default process name,
- * indicating the desire to run in another packages VM.
- */
- private static boolean isSharingRuntime(ApplicationInfo appInfo) {
- IPackageManager pm = getPackageManager();
- android.content.pm.PackageInfo pi = null;
- try {
- pi = pm.getPackageInfo(appInfo.packageName, 0, UserHandle.myUserId());
- } catch (RemoteException e) {
- }
- if (pi != null) {
- boolean sharedUserIdSet = (pi.sharedUserId != null);
- boolean processNameNotDefault = (pi.applicationInfo != null) &&
- !appInfo.packageName.equals(pi.applicationInfo.processName);
- boolean sharable = sharedUserIdSet || processNameNotDefault;
- return sharable;
- }
- // We couldn't get information for the package. Be pessimistic and assume
- // it's sharing the runtime.
- return true;
- }
-
private void updateDefaultDensity() {
if (mCurDefaultDisplayDpi != Configuration.DENSITY_DPI_UNDEFINED
&& mCurDefaultDisplayDpi != DisplayMetrics.DENSITY_DEVICE