summaryrefslogtreecommitdiff
path: root/libs/androidfw/misc.cpp
diff options
context:
space:
mode:
author Jimmy Hu <hhhuuu@google.com> 2022-10-24 07:03:21 +0000
committer Jimmy Hu <hhhuuu@google.com> 2022-10-24 07:42:55 +0000
commita31fd420292a12cb7ca14d7518cc6b7d3ca2c296 (patch)
treefea875245c3b3063628b993cf1eb0bea9f49a072 /libs/androidfw/misc.cpp
parente79e299e33a116ccb35ba968180b4e66e818c52b (diff)
Fix possible NPE in StorageNotification.
Because findRecordByUuid() can return null, add a null check to avoid NPE. StorageNotification: Notifying about private volume: VolumeInfo{private}: StorageNotification: type=PRIVATE diskId=null partGuid=null mountFlags=0 mountUserId=-10000 StorageNotification: state=MOUNTED StorageNotification: fsType=null fsUuid=null fsLabel=null StorageNotification: path=/data internalPath=null AndroidRuntime: FATAL EXCEPTION: main AndroidRuntime: Process: com.android.systemui, PID: 5952 AndroidRuntime: Caused by: java.lang.NullPointerException: Attempt to invoke virtual method 'boolean android.os.storage.VolumeRecord.isSnoozed()' on a null object reference AndroidRuntime: at com.android.systemui.usb.StorageNotification.onVolumeStateChangedInternal(StorageNotification.java:337) AndroidRuntime: at com.android.systemui.usb.StorageNotification.start(StorageNotification.java:114) Bug: 253408750 Test: build, boot Signed-off-by: Jimmy Hu <hhhuuu@google.com> Change-Id: I8859d4d578ca040771bef9cf9870f91fb8d29628
Diffstat (limited to 'libs/androidfw/misc.cpp')
0 files changed, 0 insertions, 0 deletions