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

Commit f967770a authored by Amit Mahajan's avatar Amit Mahajan Committed by Android (Google) Code Review
Browse files

Merge "Add a null check for the result of getPackagesForUid()" into sc-dev

parents cb4cf2d9 0d93cd73
Loading
Loading
Loading
Loading
+6 −4
Original line number Diff line number Diff line
@@ -381,12 +381,14 @@ public class UiccCarrierPrivilegeRules extends Handler {
            PackageManager packageManager, int uid) {
        String[] packages = packageManager.getPackagesForUid(uid);

        if (packages != null) {
            for (String pkg : packages) {
                int accessStatus = getCarrierPrivilegeStatus(packageManager, pkg);
                if (accessStatus != TelephonyManager.CARRIER_PRIVILEGE_STATUS_NO_ACCESS) {
                    return accessStatus;
                }
            }
        }
        return TelephonyManager.CARRIER_PRIVILEGE_STATUS_NO_ACCESS;
    }