commit | 556718dbb2a136c7185d06393bb3350793f159c0 | [log] [tgz] |
---|---|---|
author | Andreas Gampe <agampe@google.com> | Fri Dec 11 16:08:16 2015 -0800 |
committer | Andreas Gampe <agampe@google.com> | Fri Dec 11 16:08:16 2015 -0800 |
tree | ff11db963eea72dd6c2e5cc7f82c401663c35b74 | |
parent | b052aad297bd1d0e36c290eb20e262aea5d670c4 [diff] |
Frameworks/base: Avoid useless array allocation Don't allocate an unused array. Bug: 19797138 Change-Id: I40539e7659a21a34a7d49c48bbeb51acf9bfe235
diff --git a/services/core/java/com/android/server/am/ActivityManagerService.java b/services/core/java/com/android/server/am/ActivityManagerService.java index 9a185bb..22d30df 100644 --- a/services/core/java/com/android/server/am/ActivityManagerService.java +++ b/services/core/java/com/android/server/am/ActivityManagerService.java
@@ -11772,13 +11772,11 @@ 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; }