binder: FdTrigger ensure POLLERR / POLLNVAL is checked

... by aborting if incoming events is 0, so that
it returns DEAD_OBJECT when POLLERR / POLLNVAL
is hit on one of the FDs. Otherwise, if
incoming events is 0, trigerrablePoll() may
block forever.

Also abort if poll() with infinite timeout returns 0. This
way we can remove the while loop, making the code clearer.

Also add a test on triggerablePoll.

Test: binderRpcTest
Fixes: 200999583
Change-Id: I2ae6c4ef2ee825e77e20b43e859df192238be724
1 file changed