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

Commit af6c4195 authored by Suprabh Shukla's avatar Suprabh Shukla
Browse files

Adding null check on VolumeInfo

Storage manager returns null volumeInfo for a volume that is ejected.
Adding a null check to prevent crashing system ui.

Bug: b/28211502
Change-Id: Icd18dda8cad4e6020df3e4c5b3be6daaa3b22fbe
parent 8438a729
Loading
Loading
Loading
Loading
+3 −2
Original line number Diff line number Diff line
@@ -654,8 +654,9 @@ public class StorageNotification extends SystemUI {
        intent.putExtra(PackageManager.EXTRA_MOVE_ID, move.moveId);

        final VolumeInfo vol = mStorageManager.findVolumeByQualifiedUuid(move.volumeUuid);
        if (vol != null) {
            intent.putExtra(VolumeInfo.EXTRA_VOLUME_ID, vol.getId());

        }
        return PendingIntent.getActivityAsUser(mContext, move.moveId, intent,
                PendingIntent.FLAG_CANCEL_CURRENT, null, UserHandle.CURRENT);
    }