Loading services/java/com/android/server/ProcessStats.java +19 −16 Original line number Diff line number Diff line Loading @@ -509,6 +509,8 @@ public class ProcessStats { } int speed = 0; String file = readFile("/sys/devices/system/cpu/cpu0/cpufreq/stats/time_in_state", '\0'); // Note: file may be null on kernels without cpufreq (i.e. the emulator's) if (file != null) { StringTokenizer st = new StringTokenizer(file, "\n "); while (st.hasMoreElements()) { String token = st.nextToken(); Loading @@ -528,6 +530,7 @@ public class ProcessStats { Log.i(TAG, "Unable to parse time_in_state"); } } } if (out == null) { out = new long[speed]; mCpuSpeeds = new long[speed]; Loading Loading
services/java/com/android/server/ProcessStats.java +19 −16 Original line number Diff line number Diff line Loading @@ -509,6 +509,8 @@ public class ProcessStats { } int speed = 0; String file = readFile("/sys/devices/system/cpu/cpu0/cpufreq/stats/time_in_state", '\0'); // Note: file may be null on kernels without cpufreq (i.e. the emulator's) if (file != null) { StringTokenizer st = new StringTokenizer(file, "\n "); while (st.hasMoreElements()) { String token = st.nextToken(); Loading @@ -528,6 +530,7 @@ public class ProcessStats { Log.i(TAG, "Unable to parse time_in_state"); } } } if (out == null) { out = new long[speed]; mCpuSpeeds = new long[speed]; Loading