The IR pulse sequences are written to a local buffer to be
passed to the kernel.
Previously, we doubled the fixed size buffer (from 1K to 2K)
to work around a crash that was occurring for long sequences.
Another crash has been found when using Smart IR Remote and the
POWER function of the TX P42X10E remote by Panasonic (TV category).
Rather than double the size again and wait for another counter-
example, dynamically allocate the buffer and grow it as needed
to handle any IR sequence.
Change-Id: Id4fb799d8a5ad4242e04a68e6cc6436a14f4d2d0
According to:
https://developer.android.com/reference/android/hardware/ConsumerIrManager.html#transmit%28int,%20int[]%29
the pattern is supposed to be in ms. Apparently Samsung and HTC
in versions 4.4.2 and earlier of Android were treating this as
the number of pulses instead of ms. This is what our HAL is
supporting because it mimic'ed what the vendors were doing.
However, we should switch to the correct spec of the pattern (ms)
and eventually this will cause apps to converge on the right
patterns.
Currently, this change will break half the existing apps and cause
the other half of the apps to stop being broken and to start
working.
Change-Id: I87cedcc8e0b85d7b96ed63c7d4f82cc53ecb4ecb