summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--services/core/java/com/android/server/power/stats/CpuPowerStatsCollector.java4
1 files changed, 4 insertions, 0 deletions
diff --git a/services/core/java/com/android/server/power/stats/CpuPowerStatsCollector.java b/services/core/java/com/android/server/power/stats/CpuPowerStatsCollector.java
index a388932cb708..b8e581f32a58 100644
--- a/services/core/java/com/android/server/power/stats/CpuPowerStatsCollector.java
+++ b/services/core/java/com/android/server/power/stats/CpuPowerStatsCollector.java
@@ -592,6 +592,10 @@ public class CpuPowerStatsCollector extends PowerStatsCollector {
public void dumpCpuPowerBracketsLocked(PrintWriter pw) {
ensureInitialized();
+ if (mLayout == null) {
+ return;
+ }
+
pw.println("CPU power brackets; cluster/freq in MHz(avg current in mA):");
for (int bracket = 0; bracket < mLayout.getCpuPowerBracketCount(); bracket++) {
pw.print(" ");