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

Commit cf011546 authored by Jay Sullivan's avatar Jay Sullivan Committed by Android (Google) Code Review
Browse files

Merge "Add REQUESTED_PERMISSION_IMPLICIT flag"

parents 1362f657 d049e2d7
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -11523,6 +11523,7 @@ package android.content.pm {
    field public static final int INSTALL_LOCATION_INTERNAL_ONLY = 1; // 0x1
    field public static final int INSTALL_LOCATION_PREFER_EXTERNAL = 2; // 0x2
    field public static final int REQUESTED_PERMISSION_GRANTED = 2; // 0x2
    field public static final int REQUESTED_PERMISSION_IMPLICIT = 4; // 0x4
    field public static final int REQUESTED_PERMISSION_NEVER_FOR_LOCATION = 65536; // 0x10000
    field public android.content.pm.ActivityInfo[] activities;
    field public android.content.pm.ApplicationInfo applicationInfo;
+7 −0
Original line number Diff line number Diff line
@@ -251,6 +251,13 @@ public class PackageInfo implements Parcelable {
     */
    public static final int REQUESTED_PERMISSION_NEVER_FOR_LOCATION = 0x00010000;

    /**
     * Flag for {@link #requestedPermissionsFlags}: the requested permission was
     * not explicitly requested via uses-permission, but was instead implicitly
     * requested (e.g., for version compatibility reasons).
     */
    public static final int REQUESTED_PERMISSION_IMPLICIT = 0x00000004;

    /**
     * Array of all signatures read from the package file. This is only filled
     * in if the flag {@link PackageManager#GET_SIGNATURES} was set. A package
+4 −0
Original line number Diff line number Diff line
@@ -293,6 +293,10 @@ public class PackageInfoWithoutStateUtils {
                        pi.requestedPermissionsFlags[i] |=
                                PackageInfo.REQUESTED_PERMISSION_NEVER_FOR_LOCATION;
                    }
                    if (pkg.getImplicitPermissions().contains(pi.requestedPermissions[i])) {
                        pi.requestedPermissionsFlags[i] |=
                                PackageInfo.REQUESTED_PERMISSION_IMPLICIT;
                    }
                }
            }
        }