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

Commit 29c5266d authored by Makoto Onuki's avatar Makoto Onuki Committed by Android (Google) Code Review
Browse files

Merge "Avoid NPE in AM.getMyMemoryState()" into pi-dev

parents 4524e935 40b62087
Loading
Loading
Loading
Loading
+7 −2
Original line number Diff line number Diff line
@@ -15952,7 +15952,10 @@ public class ActivityManagerService extends IActivityManager.Stub
    }
    @Override
    public void getMyMemoryState(ActivityManager.RunningAppProcessInfo outInfo) {
    public void getMyMemoryState(ActivityManager.RunningAppProcessInfo outState) {
        if (outState == null) {
            throw new IllegalArgumentException("outState is null");
        }
        enforceNotIsolatedCaller("getMyMemoryState");
        final int callingUid = Binder.getCallingUid();
@@ -15963,7 +15966,9 @@ public class ActivityManagerService extends IActivityManager.Stub
            synchronized (mPidsSelfLocked) {
                proc = mPidsSelfLocked.get(Binder.getCallingPid());
            }
            fillInProcMemInfo(proc, outInfo, clientTargetSdk);
            if (proc != null) {
                fillInProcMemInfo(proc, outState, clientTargetSdk);
            }
        }
    }