mirror of
https://github.com/Evolution-X-Devices/device_google_zuma
synced 2026-01-27 17:24:46 +00:00
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: I2cbe70d3b00cb2cf8c28a28d91a18fbf7c326ea7 Signed-off-by: Kuen-Han Tsai <khtsai@google.com>