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

Commit 3d98dae9 authored by Adnan Begovic's avatar Adnan Begovic Committed by Gerrit Code Review
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 a563b304
Loading
Loading
Loading
Loading
+3 −0
Original line number Original line Diff line number Diff line
@@ -139,4 +139,7 @@
    <!-- Uicc hotswapped event configuration needed notification -->
    <!-- Uicc hotswapped event configuration needed notification -->
    <java-symbol type="string" name="uicc_hot_swapped_event_title" />
    <java-symbol type="string" name="uicc_hot_swapped_event_title" />
    <java-symbol type="string" name="uicc_hot_swapped_event_text" />
    <java-symbol type="string" name="uicc_hot_swapped_event_text" />

    <!-- Usb drive persistent notification -->
    <java-symbol type="bool" name="config_persistUsbDriveNotification" />
</resources>
</resources>
+3 −0
Original line number Original line Diff line number Diff line
@@ -2566,4 +2566,7 @@
    <!-- Older rotation sensors are not setting event.timestamp correctly. Setting to
    <!-- Older rotation sensors are not setting event.timestamp correctly. Setting to
         true will use SystemClock.elapsedRealtimeNanos() to set timestamp. -->
         true will use SystemClock.elapsedRealtimeNanos() to set timestamp. -->
    <bool name="config_useSystemClockforRotationSensor">false</bool>
    <bool name="config_useSystemClockforRotationSensor">false</bool>

    <!-- Whether to persist the notification for when a usb drive device is plugged in -->
    <bool name="config_persistUsbDriveNotification">false</bool>
</resources>
</resources>
+2 −0
Original line number Original line Diff line number Diff line
@@ -362,6 +362,8 @@ public class StorageNotification extends SystemUI {
                            mContext.getString(R.string.ext_media_unmount_action),
                            mContext.getString(R.string.ext_media_unmount_action),
                            buildUnmountPendingIntent(vol)))
                            buildUnmountPendingIntent(vol)))
                    .setContentIntent(browseIntent)
                    .setContentIntent(browseIntent)
                    .setOngoing(mContext.getResources().getBoolean(
                            R.bool.config_persistUsbDriveNotification))
                    .setCategory(Notification.CATEGORY_SYSTEM)
                    .setCategory(Notification.CATEGORY_SYSTEM)
                    .setPriority(Notification.PRIORITY_LOW);
                    .setPriority(Notification.PRIORITY_LOW);
            // Non-adoptable disks can't be snoozed.
            // Non-adoptable disks can't be snoozed.