libhidl: modify getService

1. Add a three-time retry after a second of delay each time if the first
   attempt to get a binderized implementation of a HAL fails.  This is
   necessary since a client can start before the binderized service.  In
   the absence of better synchronization, we use a timeout.

2. Make it possible for the default passthrough implementation to be
   asked for explicitly by the caller.  When a binderized implementation
   wishes to use the default implementation (e.g.,
   android.hardware.nfc@1.0-impl), it can bypass the attempt to retrieve
   the binderized call (which we know is missing).

b/31458381
b/31240290
causes b/31715232
Test: pass

Change-Id: I61b31593b381b2ab49fe20974b2316a7c0b5f25a
Signed-off-by: Iliyan Malchev <malchev@google.com>
1 file changed