This commit is contained in:
jinweihan 2026-04-19 23:50:18 -07:00 committed by GitHub
commit 8e14e64736
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 2 additions and 2 deletions

View File

@ -51,7 +51,7 @@ public class CpuInfo {
private int getHighPerfCpuCountByVariant() {
List<Integer> variants = getCpuValues("CPU variant", line -> Integer.parseInt(line.trim().substring(line.indexOf("0x") + 2), 16));
Log.d(LOG_TAG, "Binned cpu variants (variant, count): " + binnedValues(variants));
return countKeepingMin(variants);
return countDroppingMin(variants);
}
@RequiresApi(api = Build.VERSION_CODES.N)

View File

@ -26,7 +26,7 @@ private class CpuInfo(private val lines: List<String>) {
private fun getHighPerfCpuCountByVariant(): Int =
getCpuValues(property = "CPU variant") { it.substringAfter("0x").toInt(radix = 16) }
.also { Log.d(LOG_TAG, "Binned cpu variants (variant, count): ${it.binnedValues()}") }
.countKeepingMin()
.countDroppingMin()
private fun List<Int>.binnedValues() = groupingBy { it }.eachCount()