Commit 89e2c90c authored by Svet Ganov's avatar Svet Ganov
Browse files

Fix a NPE in PackageInstaller

We were returing a null PermissionGroup object to a place
where this was not expected by design. The reason for that
was an incorrect fix for b/28241097. This CL reverts the
introduced regression and adds a null check just in case.

bug:27102458

Change-Id: I78f8107d0adf6bb2da5d8e11c5f3cf3c00fe36a2
parent eff96c98
......@@ -162,10 +162,6 @@ public final class AppPermissionGroup implements Comparable<AppPermissionGroup>
group.addPermission(permission);
}
if (group.getPermissions().isEmpty()) {
return null;
}
return group;
}
......
......@@ -190,6 +190,10 @@ public class PermissionApps {
AppPermissionGroup group = AppPermissionGroup.create(mContext,
app, groupInfo, groupPermInfos, user);
if (group == null) {
continue;
}
String label = mSkipUi ? app.packageName
: app.applicationInfo.loadLabel(mPm).toString();
PermissionApp permApp = new PermissionApp(app.packageName,
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment