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

Commit 70dd4a2c authored by AdrianDC's avatar AdrianDC Committed by Adrian DC
Browse files

SystemUI: Restrict persistent USB drive notifications to USB disks

 * Without the addition of the isUsb check, a regular FAT32 MicroSD
    would have a persistent notification that is unwished

Change-Id: I396a861702674d0a6a70beb5206fb4c7374ec85d
parent 396b4c2c
Loading
Loading
Loading
Loading
+5 −2
Original line number Diff line number Diff line
@@ -362,10 +362,13 @@ public class StorageNotification extends SystemUI {
                            mContext.getString(R.string.ext_media_unmount_action),
                            buildUnmountPendingIntent(vol)))
                    .setContentIntent(browseIntent)
                    .setOngoing(mContext.getResources().getBoolean(
                            R.bool.config_persistUsbDriveNotification))
                    .setCategory(Notification.CATEGORY_SYSTEM)
                    .setPriority(Notification.PRIORITY_LOW);
            // USB disks notification can be persistent
            if (disk.isUsb()) {
                builder.setOngoing(mContext.getResources().getBoolean(
                        R.bool.config_persistUsbDriveNotification));
            }
            // Non-adoptable disks can't be snoozed.
            if (disk.isAdoptable()) {
                builder.setDeleteIntent(buildSnoozeIntent(vol.getFsUuid()));