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

Commit a93fcd59 authored by Jeff Sharkey's avatar Jeff Sharkey Committed by android-build-merger
Browse files

Merge "Fix NPE when UID doesn't exist." into pi-dev

am: 31e1171f

Change-Id: I2426e4d9d105637874aa51885b728ce3962f0698
parents de5b4f3c 31e1171f
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -1141,7 +1141,7 @@ public class NetworkPolicyManagerService extends INetworkPolicyManager.Stub {
        // TODO: support shared UIDs
        if (maxBytes > 0 && maxBytes > totalBytes / 2) {
            final String[] packageNames = mContext.getPackageManager().getPackagesForUid(maxUid);
            if (packageNames.length == 1) {
            if (packageNames != null && packageNames.length == 1) {
                try {
                    return mContext.getPackageManager().getApplicationInfo(packageNames[0],
                            MATCH_ANY_USER | MATCH_DISABLED_COMPONENTS | MATCH_DIRECT_BOOT_AWARE