hardware: consumerir: Increase test pattern length

Increase test pattern length by roughly 10x from ~50 milliseconds to ~500.
Increase test error margin from 10% to 50%.

Devices must be within 50% of the pattern length for transmit, including some
fixed communication latency between the app and hardware.  The point of this
test is to detect devices that are using an incorrect counting scheme (e.g.
periods instead of microseconds) or devices that are wildly off in transmitting
patterns.

This will still reject the cases we want to fail, while allowing for a little
more of a fixed communication latency, for the cost of a slightly longer runtime
for the test.

Bug: 14057146
Change-Id: I4348c1ebb4eeaa5b9ca20f678c0074736b272f63
Signed-off-by: Alex Ray <aray@google.com>
diff --git a/tests/tests/hardware/src/android/hardware/consumerir/cts/ConsumerIrTest.java b/tests/tests/hardware/src/android/hardware/consumerir/cts/ConsumerIrTest.java
index d88521e..e06adac 100644
--- a/tests/tests/hardware/src/android/hardware/consumerir/cts/ConsumerIrTest.java
+++ b/tests/tests/hardware/src/android/hardware/consumerir/cts/ConsumerIrTest.java
@@ -77,12 +77,12 @@
 
         ConsumerIrManager.CarrierFrequencyRange[] freqs = mCIR.getCarrierFrequencies();
         // Transmit two seconds for min and max for each frequency range
-        int[] pattern = {1111, 2222, 3333, 4444, 5555, 6666, 7777, 8888, 9999};
+        int[] pattern = {11111, 22222, 33333, 44444, 55555, 66666, 77777, 88888, 99999};
         long totalXmitTimeNanos = 0; // get the length of the pattern
         for (int slice : pattern) {
             totalXmitTimeNanos += slice * 1000; // add the time in nanoseconds
         }
-        double margin = 0.1; // max fraction xmit is allowed to be off timing
+        double margin = 0.5; // max fraction xmit is allowed to be off timing
 
         for (ConsumerIrManager.CarrierFrequencyRange range : freqs) {
             // test min freq