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

Commit 57064b0d authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Do not check targetSdkVersion if only one package"

parents dbbebbc3 892fc8d0
Loading
Loading
Loading
Loading
+4 −4
Original line number Diff line number Diff line
@@ -3697,11 +3697,11 @@ public class AccountManagerService
        if (ArrayUtils.isEmpty(packageNames)) {
            return null;
        }
        // For app op checks related to permissions all packages in the UID
        // have the same app op state, so doesn't matter which one we pick.
        // Update: due to visibility changes we want to use package with oldest target SDK,

        String packageName = packageNames[0];
        if (packageNames.length == 1) {
            return packageName;
        }
        // Due to visibility changes we want to use package with oldest target SDK
        int oldestVersion = Integer.MAX_VALUE;
        for (String name : packageNames) {
            try {