获取 CPU 型号 @return CPU 型号
()
| 90 | * @return CPU 型号 |
| 91 | */ |
| 92 | public static String getCpuModel() { |
| 93 | FileReader fr = null; |
| 94 | BufferedReader br = null; |
| 95 | try { |
| 96 | fr = new FileReader("/proc/cpuinfo"); |
| 97 | br = new BufferedReader(fr); |
| 98 | String text = br.readLine(); |
| 99 | if (text == null) { |
| 100 | return ""; |
| 101 | } |
| 102 | return text.split(":\\s+", 2)[1]; |
| 103 | } catch (Exception e) { |
| 104 | LogPrintUtils.eTag(TAG, e, "getCpuModel"); |
| 105 | } finally { |
| 106 | CloseUtils.closeIOQuietly(br, fr); |
| 107 | } |
| 108 | return ""; |
| 109 | } |
| 110 | |
| 111 | /** |
| 112 | * 获取 CPU 最大频率 ( 单位 KHZ ) |
nothing calls this directly
no test coverage detected