From 70dd4a2cb1ab15820cc29b683d542bc7440cee29 Mon Sep 17 00:00:00 2001 From: AdrianDC Date: Tue, 28 Jun 2016 16:20:28 +0200 Subject: 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 --- .../SystemUI/src/com/android/systemui/usb/StorageNotification.java | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'packages') diff --git a/packages/SystemUI/src/com/android/systemui/usb/StorageNotification.java b/packages/SystemUI/src/com/android/systemui/usb/StorageNotification.java index dd47aab..baa5321 100644 --- a/packages/SystemUI/src/com/android/systemui/usb/StorageNotification.java +++ b/packages/SystemUI/src/com/android/systemui/usb/StorageNotification.java @@ -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())); -- cgit v1.1