Merge "Check argument in PowerProfile.getNumCoresInCpuCluster" am: 74952231df am: 310c1b76ea

Change-Id: I1094043068575b6b2a77852d12ac341265aaf6df
This commit is contained in:
Automerger Merge Worker
2020-02-20 10:59:18 +00:00

View File

@@ -393,6 +393,9 @@ public class PowerProfile {
}
public int getNumCoresInCpuCluster(int cluster) {
if (cluster < 0 || cluster >= mCpuClusters.length) {
return 0; // index out of bound
}
return mCpuClusters[cluster].numCpus;
}