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

Commit eaa636aa authored by Adnan Begovic's avatar Adnan Begovic Committed by Sam Mortimer
Browse files

SystemUI: Add support for persistent usb drive notification.

  This option can be enabled via config_persistUsbDriveNotification

Change-Id: I331a759aeb914e46e3ef4842896d3465d894707a
TICKET: PAELLA-225
parent e1c2eabc
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -25,4 +25,7 @@
    <!-- The list of components which should be forced to be enabled. -->
    <string-array name="config_forceEnabledComponents" translatable="false">
    </string-array>

    <!-- Whether to persist the notification for when a usb drive device is plugged in -->
    <bool name="config_persistUsbDriveNotification">false</bool>
</resources>
+3 −0
Original line number Diff line number Diff line
@@ -21,4 +21,7 @@
    <!-- Package Manager -->
    <java-symbol type="array" name="config_disabledComponents" />
    <java-symbol type="array" name="config_forceEnabledComponents" />

    <!-- Usb drive persistent notification -->
    <java-symbol type="bool" name="config_persistUsbDriveNotification" />
</resources>
+2 −0
Original line number Diff line number Diff line
@@ -393,6 +393,8 @@ 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);
            // Non-adoptable disks can't be snoozed.
            if (disk.isAdoptable()) {