package com.tencent.wxop.stat.common; import com.ubt.jimu.unity.bluetooth.UnityActivity; import java.io.BufferedReader; import java.io.File; import java.io.FileReader; import java.io.IOException; import java.io.InputStream; /* loaded from: classes.dex */ class m { static int a() { try { return new File("/sys/devices/system/cpu/").listFiles(new n()).length; } catch (Exception e) { e.printStackTrace(); return 1; } } static int b() { StatLogger statLogger; int i = 0; try { String str = ""; InputStream inputStream = new ProcessBuilder("/system/bin/cat", "/sys/devices/system/cpu/cpu0/cpufreq/cpuinfo_max_freq").start().getInputStream(); byte[] bArr = new byte[24]; while (inputStream.read(bArr) != -1) { str = str + new String(bArr); } inputStream.close(); String trim = str.trim(); if (trim.length() > 0) { i = Integer.valueOf(trim).intValue(); } } catch (Exception e) { statLogger = l.k; statLogger.e((Throwable) e); } return i * 1000; } static int c() { StatLogger statLogger; int i = 0; try { String str = ""; InputStream inputStream = new ProcessBuilder("/system/bin/cat", "/sys/devices/system/cpu/cpu0/cpufreq/cpuinfo_min_freq").start().getInputStream(); byte[] bArr = new byte[24]; while (inputStream.read(bArr) != -1) { str = str + new String(bArr); } inputStream.close(); String trim = str.trim(); if (trim.length() > 0) { i = Integer.valueOf(trim).intValue(); } } catch (Throwable th) { statLogger = l.k; statLogger.e(th); } return i * 1000; } static String d() { String[] strArr = {"", ""}; try { BufferedReader bufferedReader = new BufferedReader(new FileReader("/proc/cpuinfo"), UnityActivity.BLOCKLY_TYPE_NONE); String[] split = bufferedReader.readLine().split("\\s+"); for (int i = 2; i < split.length; i++) { strArr[0] = strArr[0] + split[i] + " "; } bufferedReader.close(); } catch (IOException unused) { } return strArr[0]; } }