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
2023-12-18 23:36:44 -08:00
2024-01-19 06:36:07 +00:00
2024-09-12 13:18:03 -07:00
2023-07-05 08:41:34 +00:00
2024-10-09 15:15:56 +08:00
2023-04-27 21:21:06 +00:00
2023-09-18 03:09:39 +00:00
2024-08-28 22:54:00 -07:00
Description
Board tree for Google Tensor G2 devices
65 MiB
Languages
C++ 60.5%
Makefile 25.6%
PureBasic 9.1%
Shell 2.1%
C 1.5%
Other 1.2%