summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLuK1337 <priv.luk@gmail.com>2019-08-22 10:22:55 (GMT)
committerBruno Martins <bgcngm@gmail.com>2019-09-30 14:40:39 (GMT)
commit9df23a34ac38d722401578c40dc0691899e763cd (patch)
treebecc2ee3cc5c37a39abc5a1008025274ba7c2b08
parente0a5469cf5a2345fae7e81d16d717d285acd3a6e (diff)
downloadframeworks_base-9df23a34ac38d722401578c40dc0691899e763cd.zip
frameworks_base-9df23a34ac38d722401578c40dc0691899e763cd.tar.gz
frameworks_base-9df23a34ac38d722401578c40dc0691899e763cd.tar.bz2
SystemUI: Allow snoozing SD card notification unconditionally
FBE devices usually don't support adoptable therefore resulting in SD notification popping up every boot which may be quite annoying. This (kinda) reverts commit b138cb2c0df9e35d2f7683d529a67f8d8b64133c. Change-Id: I4c76d05c6950b4f605450a034c1d76773f003e77
-rw-r--r--packages/SystemUI/src/com/android/systemui/usb/StorageNotification.java8
1 files changed, 3 insertions, 5 deletions
diff --git a/packages/SystemUI/src/com/android/systemui/usb/StorageNotification.java b/packages/SystemUI/src/com/android/systemui/usb/StorageNotification.java
index 43e0d7b..91af3296 100644
--- a/packages/SystemUI/src/com/android/systemui/usb/StorageNotification.java
+++ b/packages/SystemUI/src/com/android/systemui/usb/StorageNotification.java
@@ -357,9 +357,8 @@ public class StorageNotification extends SystemUI {
final VolumeRecord rec = mStorageManager.findRecordByUuid(vol.getFsUuid());
final DiskInfo disk = vol.getDisk();
- // Don't annoy when user dismissed in past. (But make sure the disk is adoptable; we
- // used to allow snoozing non-adoptable disks too.)
- if (rec.isSnoozed() && disk.isAdoptable()) {
+ // Don't annoy when user dismissed in past.
+ if (rec.isSnoozed() && (disk.isAdoptable() || disk.isSd())) {
return null;
}
@@ -398,8 +397,7 @@ public class StorageNotification extends SystemUI {
if (disk.isUsb()) {
builder.setOngoing(true);
}
- // Non-adoptable disks can't be snoozed.
- if (disk.isAdoptable()) {
+ if (disk.isAdoptable() || disk.isSd()) {
builder.setDeleteIntent(buildSnoozeIntent(vol.getFsUuid()));
}