device_google_gs101/usb/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
..
Android.bp switch over to use new storage read api instead of 2024-06-06 13:47:09 +00:00
android.hardware.usb-service.rc init: update i2c bus numbers and move initialization to ueventd 2023-10-02 16:28:59 +00:00
android.hardware.usb-service.xml usb: update usb hal version to v3 2023-11-14 20:44:30 +00:00
service.cpp Migrate IUsb implementation to AIDL 2022-01-22 01:20:15 +00:00
Usb.cpp Usb: Add status check to prevent NPE 2024-10-09 15:14:38 +08:00
Usb.h usb: Log for retry on role switch 2024-06-13 17:12:20 +08:00
UsbDataSessionMonitor.cpp usb: dump flag value in the constructor 2024-01-10 11:47:27 +00:00
UsbDataSessionMonitor.h usb: implement heuristics to flag data compliance warnings 2023-12-26 22:33:49 +00:00