diff --git a/core/java/android/content/pm/ApplicationInfo.java b/core/java/android/content/pm/ApplicationInfo.java index 1aed9772700b2..b998539dee9c9 100644 --- a/core/java/android/content/pm/ApplicationInfo.java +++ b/core/java/android/content/pm/ApplicationInfo.java @@ -132,6 +132,13 @@ public class ApplicationInfo extends PackageItemInfo implements Parcelable { @UnsupportedAppUsage public int fullBackupContent = 0; + /** + * true if the package is capable of presenting a unified interface representing + * multiple profiles. + * @hide + */ + public boolean crossProfile; + /** * The default extra UI options for activities in this application. * Set from the {@link android.R.attr#uiOptions} attribute in the @@ -1382,6 +1389,7 @@ public class ApplicationInfo extends PackageItemInfo implements Parcelable { pw.println(prefix + "fullBackupContent=" + (fullBackupContent < 0 ? "false" : "true")); } + pw.println("crossProfile=" + (crossProfile ? "true" : "false")); if (networkSecurityConfigRes != 0) { pw.println(prefix + "networkSecurityConfigRes=0x" + Integer.toHexString(networkSecurityConfigRes)); @@ -1586,6 +1594,7 @@ public class ApplicationInfo extends PackageItemInfo implements Parcelable { uiOptions = orig.uiOptions; backupAgentName = orig.backupAgentName; fullBackupContent = orig.fullBackupContent; + crossProfile = orig.crossProfile; networkSecurityConfigRes = orig.networkSecurityConfigRes; category = orig.category; targetSandboxVersion = orig.targetSandboxVersion; @@ -1665,6 +1674,7 @@ public class ApplicationInfo extends PackageItemInfo implements Parcelable { dest.writeInt(descriptionRes); dest.writeInt(uiOptions); dest.writeInt(fullBackupContent); + dest.writeBoolean(crossProfile); dest.writeInt(networkSecurityConfigRes); dest.writeInt(category); dest.writeInt(targetSandboxVersion); @@ -1741,6 +1751,7 @@ public class ApplicationInfo extends PackageItemInfo implements Parcelable { descriptionRes = source.readInt(); uiOptions = source.readInt(); fullBackupContent = source.readInt(); + crossProfile = source.readBoolean(); networkSecurityConfigRes = source.readInt(); category = source.readInt(); targetSandboxVersion = source.readInt(); diff --git a/core/java/android/content/pm/parsing/PackageImpl.java b/core/java/android/content/pm/parsing/PackageImpl.java index 9baf3258a230b..fe8307c7c8cde 100644 --- a/core/java/android/content/pm/parsing/PackageImpl.java +++ b/core/java/android/content/pm/parsing/PackageImpl.java @@ -2382,6 +2382,7 @@ public final class PackageImpl implements ParsingPackage, ParsedPackage, Android appInfo.uiOptions = uiOptions; appInfo.volumeUuid = volumeUuid; appInfo.zygotePreloadName = zygotePreloadName; + appInfo.crossProfile = isCrossProfile(); appInfo.setBaseCodePath(baseCodePath); appInfo.setBaseResourcePath(baseCodePath);