Merge "Handle non-exist permission group correctly for pm list permissions"

This commit is contained in:
Songchun Fan
2022-04-04 20:08:13 +00:00
committed by Gerrit Code Review

View File

@@ -3516,7 +3516,7 @@ class PackageManagerShellCommand extends ShellCommand {
}
List<PermissionInfo> ps = mPermissionManager
.queryPermissionsByGroup(groupList.get(i), 0 /*flags*/);
final int count = ps.size();
final int count = (ps == null ? 0 : ps.size());
boolean first = true;
for (int p = 0 ; p < count ; p++) {
PermissionInfo pi = ps.get(p);