Merge "Fixes the system server crash issues caused by null pointer in NetworkPolicyManagerService."
This commit is contained in:
@@ -2326,9 +2326,11 @@ public class NetworkPolicyManagerService extends INetworkPolicyManager.Stub {
|
|||||||
final String[] packages = mContext.getPackageManager().getPackagesForUid(uid);
|
final String[] packages = mContext.getPackageManager().getPackagesForUid(uid);
|
||||||
final int userId = UserHandle.getUserId(uid);
|
final int userId = UserHandle.getUserId(uid);
|
||||||
|
|
||||||
for (String packageName : packages) {
|
if (packages != null) {
|
||||||
if (!mUsageStats.isAppIdle(packageName, uid, userId)) {
|
for (String packageName : packages) {
|
||||||
return false;
|
if (!mUsageStats.isAppIdle(packageName, uid, userId)) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
|
|||||||
Reference in New Issue
Block a user