Merge "Fixes the system server crash issues caused by null pointer in NetworkPolicyManagerService."
am: 7211131e23
* commit '7211131e238920db03c83f0c2c21f3c135a7e44f':
Fixes the system server crash issues caused by null pointer in NetworkPolicyManagerService.
Change-Id: Ifd70b0232fba8d1c8fe2e87b2ca95985d3c0681c
This commit is contained in:
@@ -2326,11 +2326,13 @@ 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);
|
||||||
|
|
||||||
|
if (packages != null) {
|
||||||
for (String packageName : packages) {
|
for (String packageName : packages) {
|
||||||
if (!mUsageStats.isAppIdle(packageName, uid, userId)) {
|
if (!mUsageStats.isAppIdle(packageName, uid, userId)) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user