device_google_gs101/usb
Kuen-Han Tsai 7ed8a55835 Usb: Add status check to prevent NPE
This patch prevents a Null Pointer Exception in
queryMoistureDetectionStatus() when getPortStatusHelper() fails to open
the /sys/class/typec file. The failure results in an empty
currentPortStatus vector, causing the NPE when accessing its first
element.

Bug: 361097811
Flag: EXEMPT bugfix
Test: NPE does not occur when getPortStatusHelper() fails
Change-Id: Id6886283d6f2f9179b3a9c5d535646874e9f277b
Signed-off-by: Kuen-Han Tsai <khtsai@google.com>
2024-10-09 15:14:38 +08:00
..
gadget Use absolute path for udc device 2024-07-09 03:03:33 +00:00
usb Usb: Add status check to prevent NPE 2024-10-09 15:14:38 +08:00