Fix clang warnings about struct vs. class.

Change-Id: I9f26cd01ac3153efa6d77a4133686842e2d63203
Use time() instead of clock() for timeouts.

The clock() function returns the processor time used by the process. This
is not a good timeout mechanism since the code is suspended most of the
time waiting for the forked process to finish. Replace with the time()
function.

Bug: 17154069

(cherry picked from commit 89d4949f86f4f7b6710e951afefad186c667fd6e)

Change-Id: I42f0f24ee53ef99955fd482a1089e39d491f3bd5
Merge "Use time() instead of clock() for timeouts." into du44
Binder: Resolve race condition

The transaction buffer does not be freed before sendReply,
which may result in the next command fails. e.g. If one
application immediately creates another player to play next
video clip after releases the previous one, the setup may
fail for the native player does not be freed and the surface
is still connected to the previous one.

Change-Id: Id4ce215e5558edeb7468c8b08ec939f578beb184
Signed-off-by: Yiming Cao <ym.caoyiming@gmail.com>
SF: Check ViewFrame validity before sending to hwc

Check if ViewFrame is valid before sending to hwc to make sure
composition produces valid values.

A ViewFrame can get invalid values when the framework is disconnected
which is a step necessary for some testing scenarios.

Change-Id: I2ad76061b6664dbb7d2aa3d66acaf99b880aedfe
Merge pull request #3 from DirtyUnicorns-KitKat/du44

merged