Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 5ebb1c5f authored by Jonathan Scott's avatar Jonathan Scott Committed by Android (Google) Code Review
Browse files

Merge "Add manifest attribute to signal the intent of an app to operate cross-profile."

parents 44e5637c ec60b260
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -403,6 +403,8 @@ public interface AndroidPackage extends Parcelable {

    boolean isEnabled();

    boolean isCrossProfile();

    boolean isEncryptionAware();

    boolean isExternal();
+3 −0
Original line number Diff line number Diff line
@@ -2070,6 +2070,9 @@ public class ApkParseUtils {
                            sa.getBoolean(R.styleable.AndroidManifestApplication_enabled,
                                    true));

            parsingPackage.setCrossProfile(
                    sa.getBoolean(R.styleable.AndroidManifestApplication_crossProfile, false));

            parsingPackage.setIsGame(sa.getBoolean(
                    R.styleable.AndroidManifestApplication_isGame, false));

+14 −0
Original line number Diff line number Diff line
@@ -240,6 +240,7 @@ public final class PackageImpl implements ParsingPackage, ParsedPackage, Android
    private int descriptionRes;
    private String deviceProtectedDataDir;
    private boolean enabled;
    private boolean crossProfile;
    private int flags;
    private int fullBackupContent;
    private boolean hiddenUntilInstalled;
@@ -1635,6 +1636,12 @@ public final class PackageImpl implements ParsingPackage, ParsedPackage, Android
        return this;
    }

    @Override
    public PackageImpl setCrossProfile(boolean crossProfile) {
        this.crossProfile = crossProfile;
        return this;
    }

    @Override
    public PackageImpl setUiOptions(int uiOptions) {
        this.uiOptions = uiOptions;
@@ -2834,6 +2841,11 @@ public final class PackageImpl implements ParsingPackage, ParsedPackage, Android
        return enabled;
    }

    @Override
    public boolean isCrossProfile() {
        return crossProfile;
    }

    @Override
    public String getManageSpaceActivityName() {
        return manageSpaceActivityName;
@@ -3042,6 +3054,7 @@ public final class PackageImpl implements ParsingPackage, ParsedPackage, Android
        dest.writeInt(this.descriptionRes);
        dest.writeString(this.deviceProtectedDataDir);
        dest.writeBoolean(this.enabled);
        dest.writeBoolean(this.crossProfile);
        dest.writeInt(this.flags);
        dest.writeInt(this.fullBackupContent);
        dest.writeBoolean(this.hiddenUntilInstalled);
@@ -3194,6 +3207,7 @@ public final class PackageImpl implements ParsingPackage, ParsedPackage, Android
        this.descriptionRes = in.readInt();
        this.deviceProtectedDataDir = in.readString();
        this.enabled = in.readBoolean();
        this.crossProfile = in.readBoolean();
        this.flags = in.readInt();
        this.fullBackupContent = in.readInt();
        this.hiddenUntilInstalled = in.readBoolean();
+2 −0
Original line number Diff line number Diff line
@@ -229,6 +229,8 @@ public interface ParsingPackage extends AndroidPackage {

    ParsingPackage setEnabled(boolean enabled);

    ParsingPackage setCrossProfile(boolean crossProfile);

    ParsingPackage setFullBackupContent(int fullBackupContent);

    ParsingPackage setHasDomainUrls(boolean hasDomainUrls);
+6 −0
Original line number Diff line number Diff line
@@ -1756,6 +1756,12 @@

             The default value is {@code false}. -->
        <attr name="forceQueryable" format="boolean" />

        <!-- If {@code true} indicates that this application is capable of presenting a unified
             interface representing multiple profiles.

             The default value is {@code false}. -->
        <attr name="crossProfile" format="boolean" />
    </declare-styleable>
    <!-- The <code>permission</code> tag declares a security permission that can be
         used to control access from other packages to specific components or