1818
1919import com .flowcrypt .email .R ;
2020import com .flowcrypt .email .api .email .model .AttachmentInfo ;
21+ import com .flowcrypt .email .ui .NotificationChannelManager ;
2122
2223/**
2324 * This manager is responsible for displaying attachment notifications.
@@ -45,7 +46,8 @@ public AttachmentNotificationManager(Context context) {
4546 * @param attachmentInfo {@link AttachmentInfo} object which contains a detail information about an attachment.
4647 */
4748 public void attachmentAddedToLoadQueue (Context context , int startId , AttachmentInfo attachmentInfo ) {
48- NotificationCompat .Builder mBuilder = new NotificationCompat .Builder (context )
49+ NotificationCompat .Builder mBuilder = new NotificationCompat .Builder (context ,
50+ NotificationChannelManager .CHANNEL_ID_ATTACHMENTS )
4951 .setWhen (startId )
5052 .setShowWhen (false )
5153 .setProgress (0 , 0 , true )
@@ -72,7 +74,8 @@ public void attachmentAddedToLoadQueue(Context context, int startId, AttachmentI
7274 */
7375 public void updateLoadingProgress (Context context , int startId , AttachmentInfo attachmentInfo ,
7476 int progress , long timeLeftInMillisecond ) {
75- NotificationCompat .Builder mBuilder = new NotificationCompat .Builder (context )
77+ NotificationCompat .Builder mBuilder = new NotificationCompat .Builder (context ,
78+ NotificationChannelManager .CHANNEL_ID_ATTACHMENTS )
7679 .setProgress (MAX_FILE_SIZE_IN_PERCENTAGE , progress , timeLeftInMillisecond == 0 )
7780 .setWhen (startId )
7881 .setShowWhen (false )
@@ -103,7 +106,8 @@ public void downloadComplete(Context context, int startId, AttachmentInfo attach
103106
104107 PendingIntent pendingIntentOpenFile = PendingIntent .getActivity (context , 0 , intentOpenFile , 0 );
105108
106- NotificationCompat .Builder mBuilder = new NotificationCompat .Builder (context )
109+ NotificationCompat .Builder mBuilder = new NotificationCompat .Builder (context ,
110+ NotificationChannelManager .CHANNEL_ID_ATTACHMENTS )
107111 .setProgress (0 , 0 , false )
108112 .setAutoCancel (true )
109113 .setOngoing (false )
@@ -128,7 +132,8 @@ public void downloadComplete(Context context, int startId, AttachmentInfo attach
128132 * @param e The {@link Exception} which contains a detail information about happened error..
129133 */
130134 public void errorHappened (Context context , int startId , AttachmentInfo attachmentInfo , Exception e ) {
131- NotificationCompat .Builder mBuilder = new NotificationCompat .Builder (context )
135+ NotificationCompat .Builder mBuilder = new NotificationCompat .Builder (context ,
136+ NotificationChannelManager .CHANNEL_ID_ATTACHMENTS )
132137 .setProgress (0 , 0 , false )
133138 .setAutoCancel (true )
134139 .setOngoing (false )
0 commit comments