Clear mCurrentAccessory if accessory function is no longer enabled

Accessory mode implements debounce timeout ACCESSORY_REQUEST_TIMEOUT
within which when a disconnect is seen, the accessory function would
be removed from the usb configuration but mCurrentAccessory would
not be set to NULL until the timeout expires.

Also, setEnabledFunctions(null, false, false) does not force an
additional disconnect when accessory function has already been
removed from usb configuration.

BUG: 62241238
Change-Id: I25973475fb02d613e11396bcad5e88656ad8940a
1 file changed