Notify adb service on usb disconnect and activity stop

When a system with a new key attempts to connect to adb adbd passes the
key to the system_server which then launches an activity to prompt the
user to allow the key; adbd then waits for a response from the
system_server. For adb over usb if the user disconnects the usb cable
before responding to the prompt the system_server will not send a
response to adbd requiring a restart of adbd before a new connection
can be established. This commit notifies the adb service when the usb
cable is disconnected or when the activity is stopped through some other
means (back, home, or recent apps buttons); the system_server then sends
a response to adbd to deny the connection which allows subsequent
connections to succeed.

Fixes: 156323450
Test: Disconnected usb cable, used back, home, and recent buttons to
      stop app and verified subsequent connections displayed a prompt
      and adb sessions were successful when allowed.
Change-Id: I50d5ce3a4a1fbdc2caa843b85e2905260a37a7e9
2 files changed