device_google_gs201/usb/usb
Kuen-Han Tsai f22f21191b 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: I61c9f7647aafca28b777e53f170764ddd02c060f
Signed-off-by: Kuen-Han Tsai <khtsai@google.com>
2024-10-09 15:15:56 +08:00
..
Android.bp switch over to use new storage read api instead of 2024-06-07 14:16:50 +00:00
android.hardware.usb-service.rc Update i2c device paths 2024-02-07 04:00:46 +00:00
android.hardware.usb-service.xml usb: update usb hal version to v3 2023-11-14 20:43:36 +00:00
service.cpp Migrate IUsb implementation to AIDL 2022-03-01 03:32:23 +00:00
Usb.cpp Usb: Add status check to prevent NPE 2024-10-09 15:15:56 +08:00
Usb.h usb: Log for retry on role switch 2024-06-13 17:09:11 +08:00
UsbDataSessionMonitor.cpp usb: dump flag value in the constructor 2024-01-10 11:47:02 +00:00
UsbDataSessionMonitor.h usb: implement heuristics to flag data compliance warnings 2023-12-22 03:05:06 +00:00