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

Commit cf82703f authored by Todd Kennedy's avatar Todd Kennedy
Browse files

Move query methods

Continue trying to reduce the size of PackageManagerService by
extracting intent queries to a separate class. This is the first,
low hanging fruit, pass.

Test: Manual
Fixes: 110090130
Change-Id: I89f6968b3460ad9d64cdac75bea1eac8a9c90599
parent 6dd61f53
Loading
Loading
Loading
Loading
+12 −7
Original line number Diff line number Diff line
@@ -649,14 +649,13 @@ public abstract class PackageManagerInternal {
    public abstract boolean isDataRestoreSafe(@NonNull Signature restoringFromSig,
            @NonNull String packageName);


    /**
     * Returns true if the the signing information for {@code clientUid} is sufficient to gain
     * access gated by {@code capability}.  This can happen if the two UIDs have the same signing
     * information, if the signing information {@code clientUid} indicates that it has the signing
     * certificate for {@code serverUid} in its signing history (if it was previously signed by it),
     * or if the signing certificate for {@code clientUid} is in ths signing history for {@code
     * serverUid} and with the {@code capability} specified.
     * Returns {@code true} if the the signing information for {@code clientUid} is sufficient
     * to gain access gated by {@code capability}.  This can happen if the two UIDs have the
     * same signing information, if the signing information {@code clientUid} indicates that
     * it has the signing certificate for {@code serverUid} in its signing history (if it was
     * previously signed by it), or if the signing certificate for {@code clientUid} is in the
     * signing history for {@code serverUid} and with the {@code capability} specified.
     */
    public abstract boolean hasSignatureCapability(int serverUid, int clientUid,
            @PackageParser.SigningDetails.CertCapabilities int capability);
@@ -697,4 +696,10 @@ public abstract class PackageManagerInternal {
     */
    public abstract void freeStorage(String volumeUuid, long bytes, int storageFlags)
            throws IOException;

    /** Returns {@code true} if the specified component is enabled and matches the given flags. */
    public abstract boolean isEnabledAndMatches(@NonNull ComponentInfo info, int flags, int userId);

    /** Returns {@code true} if the given user requires extra badging for icons. */
    public abstract boolean userNeedsBadging(int userId);
}