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

Commit dd79a6f1 authored by Patrick Baumann's avatar Patrick Baumann
Browse files

Adds doc to confusingly named method.

Adds clarification to the return value of isMatchForSystemOnly

Test: None; docs only change
Bug: 135203078
Change-Id: Idc0d26759ec93932ca5c30f4f563febd87c05f91
parent 8e47f58e
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -241,6 +241,10 @@ public class AndroidPackageUtils {
        return PackageInfo.composeLongVersionCode(pkg.getVersionCodeMajor(), pkg.getVersionCode());
    }

    /**
     * Returns false iff the provided flags include the {@link PackageManager#MATCH_SYSTEM_ONLY}
     * flag and the provided package is not a system package. Otherwise returns {@code true}.
     */
    public static boolean isMatchForSystemOnly(AndroidPackage pkg, int flags) {
        if ((flags & PackageManager.MATCH_SYSTEM_ONLY) != 0) {
            return pkg.isSystem();