summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author TreeHugger Robot <treehugger-gerrit@google.com> 2018-10-02 16:14:30 +0000
committer Android (Google) Code Review <android-gerrit@google.com> 2018-10-02 16:14:30 +0000
commitba0340ff276ea2455ed95de473ef498c57f6ec2e (patch)
tree9300203446f4d193f5f2d621b4cc82a031281c37
parent23961c8a8057d42b8c11345dd18c87fa0748fc8c (diff)
parent37d41091bf858c36bfce80100bccf915fcac1c94 (diff)
Merge "Make LooperStatsService ignore invalid sampling interval"
-rw-r--r--services/core/java/com/android/server/LooperStatsService.java7
1 files changed, 6 insertions, 1 deletions
diff --git a/services/core/java/com/android/server/LooperStatsService.java b/services/core/java/com/android/server/LooperStatsService.java
index 4f0e17055769..96ce6a4ee6a4 100644
--- a/services/core/java/com/android/server/LooperStatsService.java
+++ b/services/core/java/com/android/server/LooperStatsService.java
@@ -129,7 +129,12 @@ public class LooperStatsService extends Binder {
}
private void setSamplingInterval(int samplingInterval) {
- mStats.setSamplingInterval(samplingInterval);
+ if (samplingInterval > 0) {
+ mStats.setSamplingInterval(samplingInterval);
+ } else {
+ Slog.w(TAG, "Ignored invalid sampling interval (value must be positive): "
+ + samplingInterval);
+ }
}
/**