Guardrail for pull cooldown/timeout

Enforce a 1 second minimum cooldown and a 10 second maximum timeout on
pullers.

Test: bit statsd_test:*
Test: atest LibStatsPullTests
Test: atest GtsStatsdHostTestCases
Bug: 152543610
Change-Id: Ida0047235a7e56d7b700f1a7ab5cfbc2a147caeb
diff --git a/apex/framework/java/android/app/StatsManager.java b/apex/framework/java/android/app/StatsManager.java
index f021dcf..62badb4 100644
--- a/apex/framework/java/android/app/StatsManager.java
+++ b/apex/framework/java/android/app/StatsManager.java
@@ -616,7 +616,7 @@
             /**
              * Set the cool down time of the pull in milliseconds. If two successive pulls are
              * issued within the cool down, a cached version of the first pull will be used for the
-             * second pull.
+             * second pull. The minimum allowed cool down is 1 second.
              */
             @NonNull
             public Builder setCoolDownMillis(long coolDownMillis) {
@@ -625,7 +625,8 @@
             }
 
             /**
-             * Set the maximum time the pull can take in milliseconds.
+             * Set the maximum time the pull can take in milliseconds. The maximum allowed timeout
+             * is 10 seconds.
              */
             @NonNull
             public Builder setTimeoutMillis(long timeoutMillis) {