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

Commit be9e30a9 authored by Song Chun Fan's avatar Song Chun Fan
Browse files

[pm/parser] add AndroidManifestAdoptPermissions

Added for readability. Should be a no-op.

FLAG: EXEMPT bug fix
Change-Id: I4c6dde812494b6a32da40d95dcb99f4f275267d6
parent 06640833
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -2322,10 +2322,10 @@ public class PackageParser {

            } else if (tagName.equals(TAG_ADOPT_PERMISSIONS)) {
                sa = res.obtainAttributes(parser,
                        com.android.internal.R.styleable.AndroidManifestOriginalPackage);
                        com.android.internal.R.styleable.AndroidManifestAdoptPermissions);

                String name = sa.getNonConfigurationString(
                        com.android.internal.R.styleable.AndroidManifestOriginalPackage_name, 0);
                        com.android.internal.R.styleable.AndroidManifestAdoptPermissions_name, 0);

                sa.recycle();

+2 −2
Original line number Diff line number Diff line
@@ -3133,9 +3133,9 @@ public class ParsingPackageUtils {

    private static ParseResult<ParsingPackage> parseAdoptPermissions(ParseInput input,
            ParsingPackage pkg, Resources res, XmlResourceParser parser) {
        TypedArray sa = res.obtainAttributes(parser, R.styleable.AndroidManifestOriginalPackage);
        TypedArray sa = res.obtainAttributes(parser, R.styleable.AndroidManifestAdoptPermissions);
        try {
            String name = nonConfigString(0, R.styleable.AndroidManifestOriginalPackage_name, sa);
            String name = nonConfigString(0, R.styleable.AndroidManifestAdoptPermissions_name, sa);
            if (name != null) {
                pkg.addAdoptPermission(name);
            }
+1 −1
Original line number Diff line number Diff line
@@ -722,7 +722,7 @@ public interface AndroidPackage {
     * The names of packages to adopt ownership of permissions from, parsed under {@link
     * ParsingPackageUtils#TAG_ADOPT_PERMISSIONS}.
     *
     * @see R.styleable#AndroidManifestOriginalPackage_name
     * @see R.styleable#AndroidManifestAdoptPermissions_name
     * @hide
     */
    @NonNull
+11 −0
Original line number Diff line number Diff line
@@ -2892,6 +2892,17 @@
        <attr name="name" />
    </declare-styleable>

    <!-- Private tag to declare the package name that the permissions of this package
         is based on.  Only used for packages installed in the system image.  If
         given, the permissions from the other package will be propagated into the
         new package.

         <p>This appears as a child tag of the root
         {@link #AndroidManifest manifest} tag. -->
    <declare-styleable name="AndroidManifestAdoptPermissions" parent="AndroidManifest">
        <attr name="name" />
    </declare-styleable>

    <!-- The <code>processes</code> tag specifies the processes the application will run code in
         and optionally characteristics of those processes.  This tag is optional; if not
         specified, components will simply run in the processes they specify.  If supplied,