summaryrefslogtreecommitdiff
path: root/core/java/android
diff options
context:
space:
mode:
authorJeff Sharkey <jsharkey@android.com>2016-04-09 16:12:01 -0600
committerJeff Sharkey <jsharkey@android.com>2016-04-10 23:26:09 -0600
commit4288419787120ce85a241a4b315d7d2123aa2d4a (patch)
tree0ee7ac669cc99412d4788d89eb20a5116c51e7d5 /core/java/android
parentd4041db120d7500e73e0132b03dfeffb84d402f5 (diff)
Use inode numbers for CE storage.
Certain operations, such as clearing/destroying app data, or just counting on-disk size, require us to know the CE storage directory of a particular app. To facilitate these operations, offer a method to get the inode of a CE directory, and accept that inode number for later operations. Collect and store the inode number in PackageUserState for future use when that user's CE storage is still locked. This design means it's safe to clear/destroy app data in both CE/DE storage at the same time. Move most installd-related methods to a uniform calling convention that accepts a single parent PackageParser.Package, and internally fans out to handle all "leaf" packages under that parent. In previous releases, we started installing apps using a new directory-based layout, where all app code, unpacked native libraries, and optimized code is bundled together. So now we only have a single path to measure for code size. This fixes several outstanding bugs that were causing sizes to be miscounted for apps supporting multiple architectures. Fix a subtle bug in PackageSettings that would cause "notLaunched" to be parsed incorrectly. Bug: 27828915, 27197819 Change-Id: Ia582cf3550553292bde4bb4313367111332913ec
Diffstat (limited to 'core/java/android')
-rw-r--r--core/java/android/content/pm/PackageUserState.java20
1 files changed, 10 insertions, 10 deletions
diff --git a/core/java/android/content/pm/PackageUserState.java b/core/java/android/content/pm/PackageUserState.java
index e85311d6c887..8236f552901f 100644
--- a/core/java/android/content/pm/PackageUserState.java
+++ b/core/java/android/content/pm/PackageUserState.java
@@ -36,22 +36,21 @@ import com.android.internal.util.ArrayUtils;
* @hide
*/
public class PackageUserState {
+ public long ceDataInode;
+ public boolean installed;
public boolean stopped;
public boolean notLaunched;
- public boolean installed;
public boolean hidden; // Is the app restricted by owner / admin
public boolean suspended;
- public int enabled;
public boolean blockUninstall;
-
+ public int enabled;
public String lastDisableAppCaller;
+ public int domainVerificationStatus;
+ public int appLinkGeneration;
public ArraySet<String> disabledComponents;
public ArraySet<String> enabledComponents;
- public int domainVerificationStatus;
- public int appLinkGeneration;
-
public PackageUserState() {
installed = true;
hidden = false;
@@ -62,18 +61,19 @@ public class PackageUserState {
}
public PackageUserState(PackageUserState o) {
+ ceDataInode = o.ceDataInode;
installed = o.installed;
stopped = o.stopped;
notLaunched = o.notLaunched;
- enabled = o.enabled;
hidden = o.hidden;
suspended = o.suspended;
- lastDisableAppCaller = o.lastDisableAppCaller;
- disabledComponents = ArrayUtils.cloneOrNull(o.disabledComponents);
- enabledComponents = ArrayUtils.cloneOrNull(o.enabledComponents);
blockUninstall = o.blockUninstall;
+ enabled = o.enabled;
+ lastDisableAppCaller = o.lastDisableAppCaller;
domainVerificationStatus = o.domainVerificationStatus;
appLinkGeneration = o.appLinkGeneration;
+ disabledComponents = ArrayUtils.cloneOrNull(o.disabledComponents);
+ enabledComponents = ArrayUtils.cloneOrNull(o.enabledComponents);
}
/**