Closed mws-rmain closed 5 years ago
A call to unregisterReceiver() is missing in UsbService.java onDestroy() of the following 3 examples:
The 'examplemultipleports' does unregister for each of the detected ports.
I implemented this as shown below:
@Override public void onDestroy() { super.onDestroy(); unregisterReceiver(usbReceiver); UsbService.SERVICE_CONNECTED = false; }
Failure to unregister throws an exception: android.app.IntentReceiverLeaked: Service <snip>.UsbService has leaked IntentReceiver <snip>.UsbService$4@7f31a07 that was originally registered here. Are you missing a call to unregisterReceiver()?
android.app.IntentReceiverLeaked: Service <snip>.UsbService has leaked IntentReceiver <snip>.UsbService$4@7f31a07 that was originally registered here. Are you missing a call to unregisterReceiver()?
@mws-rmain Could you do a pull request?
A call to unregisterReceiver() is missing in UsbService.java onDestroy() of the following 3 examples:
The 'examplemultipleports' does unregister for each of the detected ports.
I implemented this as shown below:
Failure to unregister throws an exception:
android.app.IntentReceiverLeaked: Service <snip>.UsbService has leaked IntentReceiver <snip>.UsbService$4@7f31a07 that was originally registered here. Are you missing a call to unregisterReceiver()?