Fix null pointer exception if USBPort is removed
If for some reason a USB port instance is removed, UsbPortManager handles this by broadcasting a UsbManager.ACTION_USB_PORT_CHANGED intent with null as the UsbPortStatus argument, leading to a null pointer exception after UsbDeviceManager receives it. Take care of this by checking for null in UsbHandler.updateHostState(). Bug: 156230008 Change-Id: Ia8936358c61af5b537d1eb722a55851e0061b381
Loading
Please register or sign in to comment