Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NPE in UsbAccessory.getManufacturer() #1086

Closed
AndrewKasilov opened this issue Jun 4, 2019 · 1 comment
Closed

NPE in UsbAccessory.getManufacturer() #1086

AndrewKasilov opened this issue Jun 4, 2019 · 1 comment

Comments

@AndrewKasilov
Copy link

Bug Report

Caused by java.lang.NullPointerException: Attempt to invoke virtual method 'java.lang.String android.hardware.usb.UsbAccessory.getManufacturer()' on a null object reference at com.smartdevicelink.transport.USBTransport.isAccessorySupported(USBTransport.java:534)

Reproduction Steps
  1. Start USBAccessoryAttachmentActivity
  2. Call method wakeUpRouterService(), there should be only legacy connection possible
  3. Immediately finish the USBAccessoryAttachmentActivity
Expected Behavior

Broadcast is not sent with usbAccessory == null

Observed Behavior

When USBAccessoryAttachmentActivity is destroyed before the broadcast is sent,
usbAccessory is set to null in onDestroy and then is sent in the broadcast.

OS & Version Information
  • Android Version: 8.1
  • SDL Android Version: 4.8.0
@BrettyWhite
Copy link
Contributor

Closed with #1177

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants