Merge "Check argument in PowerProfile.getNumCoresInCpuCluster"
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user