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

Commit 74e5eba4 authored by erik.ljungberg's avatar erik.ljungberg Committed by Kenneth Andersson
Browse files

OPP: Notification position is changing

If several transfers is ongoing the Bluetooth transfer notification
is changing position. The reason for this is that the when field is
not set in the notification. Solved by setting when.

Change-Id: If999fae6dd2d6b5de38c3bfeba786ad2df9da48f
parent a2407587
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -110,6 +110,8 @@ class BluetoothOppNotification {

        int totalTotal = 0; // total bytes for current transfer

        int timeStamp = 0; // Database time stamp. Used for sorting ongoing transfers.

        String description; // the text above progress bar
    }

@@ -247,6 +249,7 @@ class BluetoothOppNotification {
                // Batch sending case
            } else {
                NotificationItem item = new NotificationItem();
                item.timeStamp = timeStamp;
                item.id = id;
                item.direction = dir;
                if (item.direction == BluetoothShare.DIRECTION_OUTBOUND) {
@@ -284,6 +287,7 @@ class BluetoothOppNotification {

            // Build the notification object
            Notification n = new Notification();
            n.when = item.timeStamp;
            if (item.direction == BluetoothShare.DIRECTION_OUTBOUND) {
                n.icon = android.R.drawable.stat_sys_upload;
                expandedView.setImageViewResource(R.id.appIcon, android.R.drawable.stat_sys_upload);