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,9 +2326,11 @@ public class NetworkPolicyManagerService extends INetworkPolicyManager.Stub {
|
||||
final String[] packages = mContext.getPackageManager().getPackagesForUid(uid);
|
||||
final int userId = UserHandle.getUserId(uid);
|
||||
|
||||
for (String packageName : packages) {
|
||||
if (!mUsageStats.isAppIdle(packageName, uid, userId)) {
|
||||
return false;
|
||||
if (packages != null) {
|
||||
for (String packageName : packages) {
|
||||
if (!mUsageStats.isAppIdle(packageName, uid, userId)) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
return true;
|
||||
|
||||
Reference in New Issue
Block a user