@@ -220,7 +220,8 @@ public static void sendPluginCommandErrorNotification(Context context, String lo
220220 reportString .append ("\n \n " ).append (AndroidUtils .getDeviceInfoMarkdownString (context ));
221221
222222 Intent notificationIntent = ReportActivity .newInstance (context , new ReportInfo (UserAction .PLUGIN_EXECUTION_COMMAND .getName (), logTag , title , null , reportString .toString (), null ,true ));
223- PendingIntent pendingIntent = PendingIntent .getActivity (context , 0 , notificationIntent , PendingIntent .FLAG_UPDATE_CURRENT );
223+ PendingIntent contentIntent = PendingIntent .getActivity (context , 0 , notificationIntent , PendingIntent .FLAG_UPDATE_CURRENT );
224+ PendingIntent deleteIntent = null ;
224225
225226 // Setup the notification channel if not already set up
226227 setupPluginCommandErrorsNotificationChannel (context );
@@ -230,7 +231,8 @@ public static void sendPluginCommandErrorNotification(Context context, String lo
230231 //CharSequence notificationTextCharSequence = notificationTextString;
231232
232233 // Build the notification
233- Notification .Builder builder = getPluginCommandErrorsNotificationBuilder (context , title , notificationTextCharSequence , notificationTextCharSequence , pendingIntent , NotificationUtils .NOTIFICATION_MODE_VIBRATE );
234+ Notification .Builder builder = getPluginCommandErrorsNotificationBuilder (context , title ,
235+ notificationTextCharSequence , notificationTextCharSequence , contentIntent , deleteIntent , NotificationUtils .NOTIFICATION_MODE_VIBRATE );
234236 if (builder == null ) return ;
235237
236238 // Send the notification
@@ -248,16 +250,19 @@ public static void sendPluginCommandErrorNotification(Context context, String lo
248250 * @param title The title for the notification.
249251 * @param notificationText The second line text of the notification.
250252 * @param notificationBigText The full text of the notification that may optionally be styled.
251- * @param pendingIntent The {@link PendingIntent} which should be sent when notification is clicked.
253+ * @param contentIntent The {@link PendingIntent} which should be sent when notification is clicked.
254+ * @param deleteIntent The {@link PendingIntent} which should be sent when notification is deleted.
252255 * @param notificationMode The notification mode. It must be one of {@code NotificationUtils.NOTIFICATION_MODE_*}.
253256 * @return Returns the {@link Notification.Builder}.
254257 */
255258 @ Nullable
256- public static Notification .Builder getPluginCommandErrorsNotificationBuilder (final Context context , final CharSequence title , final CharSequence notificationText , final CharSequence notificationBigText , final PendingIntent pendingIntent , final int notificationMode ) {
259+ public static Notification .Builder getPluginCommandErrorsNotificationBuilder (
260+ final Context context , final CharSequence title , final CharSequence notificationText ,
261+ final CharSequence notificationBigText , final PendingIntent contentIntent , final PendingIntent deleteIntent , final int notificationMode ) {
257262
258263 Notification .Builder builder = NotificationUtils .geNotificationBuilder (context ,
259264 TermuxConstants .TERMUX_PLUGIN_COMMAND_ERRORS_NOTIFICATION_CHANNEL_ID , Notification .PRIORITY_HIGH ,
260- title , notificationText , notificationBigText , pendingIntent , notificationMode );
265+ title , notificationText , notificationBigText , contentIntent , deleteIntent , notificationMode );
261266
262267 if (builder == null ) return null ;
263268
0 commit comments