Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit b0547cfb authored by Jing Ji's avatar Jing Ji
Browse files

Move the AppRestrictionController dump out of the global AMS lock

Bug: 220930052
Test: dumpsys activity -a
Test: atest CtsContentTestCases
Change-Id: Iceaeb7239889d1a6706f98c54e52f631b231994c
parent 6ed5d640
Loading
Loading
Loading
Loading
+11 −4
Original line number Diff line number Diff line
@@ -9155,11 +9155,15 @@ public class ActivityManagerService extends IActivityManager.Stub
            }
            mComponentAliasResolver.dump(pw);
        }
        if (dumpAll) {
    }
    /**
     * Dump the app restriction controller, it's required not to hold the global lock here.
     */
    private void dumpAppRestrictionController(PrintWriter pw) {
        pw.println("-------------------------------------------------------------------------------");
        mAppRestrictionController.dump(pw, "");
    }
    }
    /**
     * Wrapper function to print out debug data filtered by specified arguments.
@@ -9514,6 +9518,9 @@ public class ActivityManagerService extends IActivityManager.Stub
                            dumpNormalPriority, dumpAppId, false /* dumpProxies */);
                }
            }
            if (dumpAll) {
                dumpAppRestrictionController(pw);
            }
        }
        Binder.restoreCallingIdentity(origId);
    }