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

Commit 8472c169 authored by Narayan Kamath's avatar Narayan Kamath Committed by Jack Yu
Browse files

ActivityManager: Fix argument order for enqueueProcessChangeItemLocked

Change method arguments to be (pid, uid), the same as the callbacks.
The caller in OomAdjuster had the order wrong, and this change makes
that caller correct. The other caller in ActivityManagerService has been
changed as well.

Bug: 129074753
Bug: 129318739
Test: manual
Change-Id: Ifece49924a99ab592162f5b6466c7631d909408f
parent 8180db88
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -3103,7 +3103,7 @@ public class ActivityManagerService extends IActivityManager.Stub
    }
    @GuardedBy("this")
    ProcessChangeItem enqueueProcessChangeItemLocked(int uid, int pid) {
    ProcessChangeItem enqueueProcessChangeItemLocked(int pid, int uid) {
        int i = mPendingProcessChanges.size()-1;
        ActivityManagerService.ProcessChangeItem item = null;
        while (i >= 0) {
@@ -16362,7 +16362,7 @@ public class ActivityManagerService extends IActivityManager.Stub
        if (proc.getForegroundServiceTypes() != fgServiceTypes) {
            proc.setReportedForegroundServiceTypes(fgServiceTypes);
            ProcessChangeItem item = enqueueProcessChangeItemLocked(proc.info.uid, proc.pid);
            ProcessChangeItem item = enqueueProcessChangeItemLocked(proc.pid, proc.info.uid);
            item.changes = ProcessChangeItem.CHANGE_FOREGROUND_SERVICES;
            item.foregroundServiceTypes = fgServiceTypes;
        }