summaryrefslogtreecommitdiffstats
path: root/core
diff options
context:
space:
mode:
authorFyodor Kupolov <fkupolov@google.com>2015-09-09 15:56:45 -0700
committerFyodor Kupolov <fkupolov@google.com>2015-09-10 10:44:49 -0700
commitebcac16cb1405bf7d0b570e11a287df078edfc1c (patch)
tree8d54dc963ba05a170a268c3f281c1d658979d72a /core
parent0018323c07d119fde7260d66f60dd9987c7b74ea (diff)
downloadframeworks_base-ebcac16cb1405bf7d0b570e11a287df078edfc1c.zip
frameworks_base-ebcac16cb1405bf7d0b570e11a287df078edfc1c.tar.gz
frameworks_base-ebcac16cb1405bf7d0b570e11a287df078edfc1c.tar.bz2
Use app directory as apkPath for cluster installs
Previously, size of of oat directory was not counted by the getsize command, because base APK location was passed as apkpath argument. Bug: 23896047 Change-Id: Ic7b6b725785ff2e2a0cf3887ba68c162b23b1212
Diffstat (limited to 'core')
-rw-r--r--core/java/android/content/pm/PackageParser.java11
1 files changed, 11 insertions, 0 deletions
diff --git a/core/java/android/content/pm/PackageParser.java b/core/java/android/content/pm/PackageParser.java
index ed7a2a3..7032c9a 100644
--- a/core/java/android/content/pm/PackageParser.java
+++ b/core/java/android/content/pm/PackageParser.java
@@ -4520,6 +4520,17 @@ public class PackageParser {
return applicationInfo.isUpdatedSystemApp();
}
+ /**
+ * @hide
+ */
+ public boolean canHaveOatDir() {
+ // The following app types CANNOT have oat directory
+ // - non-updated system apps
+ // - forward-locked apps or apps installed in ASEC containers
+ return (!isSystemApp() || isUpdatedSystemApp())
+ && !isForwardLocked() && !applicationInfo.isExternalAsec();
+ }
+
public String toString() {
return "Package{"
+ Integer.toHexString(System.identityHashCode(this))