Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit a31fd420 authored by Jimmy Hu's avatar Jimmy Hu
Browse files

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: default avatarJimmy Hu <hhhuuu@google.com>
Change-Id: I8859d4d578ca040771bef9cf9870f91fb8d29628
parent e79e299e
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment