If we have multiple queued auth requests, we need to dispatch our
pending prompts on success as well as failure.
Test: `mux off; mux a; mux off; mux` to switch, then tapped allow twice
Change-Id: I14ce2a1c43fbd9af45397c9fb778a0e145ceabba
As part of moving adbd into a module, split authentication out into a
library with a stable ABI that lives on the system image.
Bug: http://b/137798163
Test: for i in `seq 1 100000`; do echo $i; adb wait-for-device shell "su 0 stop; su 0 start; sleep 10"; adb disconnect; done
Change-Id: I05e3679598e33c83f8cc4c17208f4f753cbfd5e1