diff options
author | Adam Lesinski <adamlesinski@google.com> | 2015-09-18 22:15:19 +0000 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2015-09-18 22:15:19 +0000 |
commit | e54253bdd317cbe806225081ad9ebe64f2b50b9a (patch) | |
tree | e3f19df8ac1f153845f7ed63575b6326deef1b12 /core | |
parent | 680553957e4ff47343334881c34de6969b2ed977 (diff) | |
parent | 8057133d49ab3243de54333012ce5ee8fece5381 (diff) | |
download | frameworks_base-e54253bdd317cbe806225081ad9ebe64f2b50b9a.zip frameworks_base-e54253bdd317cbe806225081ad9ebe64f2b50b9a.tar.gz frameworks_base-e54253bdd317cbe806225081ad9ebe64f2b50b9a.tar.bz2 |
Merge "Fix crash when no power_profile is specified" into mnc-dr-dev
Diffstat (limited to 'core')
-rw-r--r-- | core/java/com/android/internal/os/KernelCpuSpeedReader.java | 2 | ||||
-rw-r--r-- | core/java/com/android/internal/os/KernelUidCpuTimeReader.java | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/core/java/com/android/internal/os/KernelCpuSpeedReader.java b/core/java/com/android/internal/os/KernelCpuSpeedReader.java index e16ae0b..5b776ac 100644 --- a/core/java/com/android/internal/os/KernelCpuSpeedReader.java +++ b/core/java/com/android/internal/os/KernelCpuSpeedReader.java @@ -58,7 +58,7 @@ public class KernelCpuSpeedReader { TextUtils.SimpleStringSplitter splitter = new TextUtils.SimpleStringSplitter(' '); String line; int speedIndex = 0; - while ((line = reader.readLine()) != null) { + while (speedIndex < mLastSpeedTimes.length && (line = reader.readLine()) != null) { splitter.setString(line); Long.parseLong(splitter.next()); diff --git a/core/java/com/android/internal/os/KernelUidCpuTimeReader.java b/core/java/com/android/internal/os/KernelUidCpuTimeReader.java index 0df78ed..5d3043c 100644 --- a/core/java/com/android/internal/os/KernelUidCpuTimeReader.java +++ b/core/java/com/android/internal/os/KernelUidCpuTimeReader.java @@ -137,7 +137,7 @@ public class KernelUidCpuTimeReader { mLastPowerMaUs.put(uid, powerMaUs); } } catch (IOException e) { - Slog.e(TAG, "Failed to read uid_cputime", e); + Slog.e(TAG, "Failed to read uid_cputime: " + e.getMessage()); } mLastTimeReadUs = nowUs; } |