Merge "Fix an issue that restricted package is not printed if it has no ... allowed packages." into rvc-dev am: 672950aa30
Change-Id: Ie183b8782a95817731c3f0e7f068f203455509a6
This commit is contained in:
@@ -12121,8 +12121,6 @@ public class ActivityManagerService extends IActivityManager.Stub
|
||||
|
||||
void dumpAllowedAssociationsLocked(FileDescriptor fd, PrintWriter pw, String[] args,
|
||||
int opti, boolean dumpAll, String dumpPackage) {
|
||||
boolean needSep = false;
|
||||
|
||||
pw.println("ACTIVITY MANAGER ALLOWED ASSOCIATION STATE (dumpsys activity allowed-associations)");
|
||||
boolean printed = false;
|
||||
if (mAllowedAssociations != null) {
|
||||
@@ -12130,21 +12128,16 @@ public class ActivityManagerService extends IActivityManager.Stub
|
||||
final String pkg = mAllowedAssociations.keyAt(i);
|
||||
final ArraySet<String> asc =
|
||||
mAllowedAssociations.valueAt(i).getAllowedPackageAssociations();
|
||||
boolean printedHeader = false;
|
||||
if (!printed) {
|
||||
pw.println(" Allowed associations (by restricted package):");
|
||||
printed = true;
|
||||
}
|
||||
pw.print(" * ");
|
||||
pw.print(pkg);
|
||||
pw.println(":");
|
||||
for (int j = 0; j < asc.size(); j++) {
|
||||
if (dumpPackage == null || pkg.equals(dumpPackage)
|
||||
|| asc.valueAt(j).equals(dumpPackage)) {
|
||||
if (!printed) {
|
||||
pw.println(" Allowed associations (by restricted package):");
|
||||
printed = true;
|
||||
needSep = true;
|
||||
}
|
||||
if (!printedHeader) {
|
||||
pw.print(" * ");
|
||||
pw.print(pkg);
|
||||
pw.println(":");
|
||||
printedHeader = true;
|
||||
}
|
||||
pw.print(" Allow: ");
|
||||
pw.println(asc.valueAt(j));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user