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

Commit 7211131e authored by Treehugger Robot's avatar Treehugger Robot Committed by Gerrit Code Review
Browse files

Merge "Fixes the system server crash issues caused by null pointer in NetworkPolicyManagerService."

parents 104518e4 0655edd6
Loading
Loading
Loading
Loading
+5 −3
Original line number Diff line number Diff line
@@ -2326,11 +2326,13 @@ public class NetworkPolicyManagerService extends INetworkPolicyManager.Stub {
        final String[] packages = mContext.getPackageManager().getPackagesForUid(uid);
        final int userId = UserHandle.getUserId(uid);

        if (packages != null) {
            for (String packageName : packages) {
                if (!mUsageStats.isAppIdle(packageName, uid, userId)) {
                    return false;
                }
            }
        }
        return true;
    }