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

Commit 556718db authored by Andreas Gampe's avatar Andreas Gampe
Browse files

Frameworks/base: Avoid useless array allocation

Don't allocate an unused array.

Bug: 19797138
Change-Id: I40539e7659a21a34a7d49c48bbeb51acf9bfe235
parent b052aad2
Loading
Loading
Loading
Loading
+0 −2
Original line number Diff line number Diff line
@@ -11772,13 +11772,11 @@ public final class ActivityManagerService extends ActivityManagerNative
        boolean killed = false;
        synchronized (mPidsSelfLocked) {
            int[] types = new int[pids.length];
            int worstType = 0;
            for (int i=0; i<pids.length; i++) {
                ProcessRecord proc = mPidsSelfLocked.get(pids[i]);
                if (proc != null) {
                    int type = proc.setAdj;
                    types[i] = type;
                    if (type > worstType) {
                        worstType = type;
                    }