summaryrefslogtreecommitdiffstats
path: root/packages
diff options
context:
space:
mode:
authorAdrianDC <radian.dc@gmail.com>2016-06-28 16:20:28 +0200
committerAdrian DC <radian.dc@gmail.com>2016-07-02 15:28:30 -0700
commit70dd4a2cb1ab15820cc29b683d542bc7440cee29 (patch)
treeecc4899376cbee1271d200b4cb8e7b1df448c98b /packages
parent396b4c2c2804e75e2eb556dade5c8904f219fbb9 (diff)
downloadframeworks_base-70dd4a2cb1ab15820cc29b683d542bc7440cee29.zip
frameworks_base-70dd4a2cb1ab15820cc29b683d542bc7440cee29.tar.gz
frameworks_base-70dd4a2cb1ab15820cc29b683d542bc7440cee29.tar.bz2
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
Diffstat (limited to 'packages')
-rw-r--r--packages/SystemUI/src/com/android/systemui/usb/StorageNotification.java7
1 files changed, 5 insertions, 2 deletions
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()));