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

Commit b9d266ff authored by songjinshi's avatar songjinshi Committed by android-build-merger
Browse files

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

am: 7211131e

* commit '7211131e':
  Fixes the system server crash issues caused by null pointer in NetworkPolicyManagerService.

Change-Id: Ifd70b0232fba8d1c8fe2e87b2ca95985d3c0681c
parents 9eb77405 7211131e
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;
    }