该楼层疑似违规已被系统折叠 隐藏此楼查看此楼
fl("/sys/class/thermal/", zones)
for(zone;zones) {
ss("/sys/class/thermal/" + zone + "/", path)
f(zone ?* "thermal_zone") {
ss(path + "temp", tempFile)
fe(tempFile, valid)
} else {
s valid = false
}
f(valid) {
fr(path + "type", type)
f(type ? "cpu") {
// MTK
fr(tempFile, temp)
strim(temp, temp)
java(temp, null, "java.lang.Long.valueOf", "String", temp)
f(temp == null || temp <= 0) {
temp = "unknown"
} else {
s/(temp, 1000, true, temp)
}
syso("MTK CPU " + zone + " temperature " + temp)
} else f(type ? "tsens_tz_sensor") {
// Qualcomm
fr(tempFile, temp)
strim(temp, temp)
java(temp, null, "java.lang.Long.valueOf", "String", temp)
f(temp == null || temp <= 0) {
temp = "unknown"
} else f(temp > 100) {
s/(temp, 10, true, temp)
}
syso("Qualcomm CPU " + zone + " temperature " + temp)
}
}
}
// 注:检测结果仅供参考,可能与真实数据存在较大差异
// 作者残页