Merge "Check argument in PowerProfile.getNumCoresInCpuCluster"

This commit is contained in:
Treehugger Robot
2020-02-20 10:36:46 +00:00
committed by Gerrit Code Review

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;
}