Merge "Check argument in PowerProfile.getNumCoresInCpuCluster" am: 74952231df
Change-Id: Id1bf2fa710c24ba76efbc5ad9b83dab63b8c334a
This commit is contained in:
@@ -393,6 +393,9 @@ public class PowerProfile {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public int getNumCoresInCpuCluster(int cluster) {
|
public int getNumCoresInCpuCluster(int cluster) {
|
||||||
|
if (cluster < 0 || cluster >= mCpuClusters.length) {
|
||||||
|
return 0; // index out of bound
|
||||||
|
}
|
||||||
return mCpuClusters[cluster].numCpus;
|
return mCpuClusters[cluster].numCpus;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user