// Path: library/src/main/java/com/liulishuo/filedownloader/util/FileDownloadLog.java
// public class FileDownloadLog {
// 
//     public static boolean NEED_LOG = false;
// 
//     private static final String TAG = "FileDownloader.";
// 
//     public static void e(Object o, Throwable e, String msg, Object... args) {
//         log(Log.ERROR, o, e, msg, args);
//     }
// 
//     public static void e(Object o, String msg, Object... args) {
//         log(Log.ERROR, o, msg, args);
//     }
// 
//     public static void i(Object o, String msg, Object... args) {
//         log(Log.INFO, o, msg, args);
//     }
// 
//     public static void d(Object o, String msg, Object... args) {
//         log(Log.DEBUG, o, msg, args);
//     }
// 
//     public static void w(Object o, String msg, Object... args) {
//         log(Log.WARN, o, msg, args);
//     }
// 
//     public static void v(Object o, String msg, Object... args) {
//         log(Log.VERBOSE, o, msg, args);
//     }
// 
//     private static void log(int priority, Object o, String message, Object... args) {
//         log(priority, o, null, message, args);
//     }
// 
//     private static void log(int priority, Object o, Throwable throwable, String message,
//                             Object... args) {
//         final boolean force = priority >= Log.WARN;
//         if (!force && !NEED_LOG) {
//             return;
//         }
// 
//         Log.println(priority, getTag(o), FileDownloadUtils.formatString(message, args));
//         if (throwable != null) {
//             throwable.printStackTrace();
//         }
//     }
// 
//     private static String getTag(final Object o) {
//         return TAG + ((o instanceof Class)
//                 ? ((Class) o).getSimpleName() : o.getClass().getSimpleName());
//     }
// }


import android.annotation.TargetApi;
import android.app.Notification;
import android.content.Context;
import com.liulishuo.filedownloader.R;
import com.liulishuo.filedownloader.util.FileDownloadLog;
        builder.setContentTitle(title).setContentText(content)
                .setSmallIcon(DEFAULT_NOTIFICATION_ID);
        return builder.build();
    }

    @Override
    public String toString() {
        return "ForegroundServiceConfig{"
                + "notificationId=" + notificationId
                + ", notificationChannelId='" + notificationChannelId
                + '\''
                + ", notificationChannelName='" + notificationChannelName
                + '\''
                + ", notification=" + notification
                + ", needRecreateChannelId=" + needRecreateChannelId
                + '}';
    }

    public static class Builder {
        private int notificationId;
        private String notificationChannelId;
        private String notificationChannelName;
        private Notification notification;
        private boolean needRecreateChannelId;

        public Builder notificationId(int notificationId) {
            this.notificationId = notificationId;
            return this;
        }

// Path: library/src/main/java/com/liulishuo/filedownloader/util/FileDownloadLog.java
// public class FileDownloadLog {
// 
//     public static boolean NEED_LOG = false;
// 
//     private static final String TAG = "FileDownloader.";
// 
//     public static void e(Object o, Throwable e, String msg, Object... args) {
//         log(Log.ERROR, o, e, msg, args);
//     }
// 
//     public static void e(Object o, String msg, Object... args) {
//         log(Log.ERROR, o, msg, args);
//     }
// 
//     public static void i(Object o, String msg, Object... args) {
//         log(Log.INFO, o, msg, args);
//     }
// 
//     public static void d(Object o, String msg, Object... args) {
//         log(Log.DEBUG, o, msg, args);
//     }
// 
//     public static void w(Object o, String msg, Object... args) {
//         log(Log.WARN, o, msg, args);
//     }
// 
//     public static void v(Object o, String msg, Object... args) {
//         log(Log.VERBOSE, o, msg, args);
//     }
// 
//     private static void log(int priority, Object o, String message, Object... args) {
//         log(priority, o, null, message, args);
//     }
// 
//     private static void log(int priority, Object o, Throwable throwable, String message,
//                             Object... args) {
//         final boolean force = priority >= Log.WARN;
//         if (!force && !NEED_LOG) {
//             return;
//         }
// 
//         Log.println(priority, getTag(o), FileDownloadUtils.formatString(message, args));
//         if (throwable != null) {
//             throwable.printStackTrace();
//         }
//     }
// 
//     private static String getTag(final Object o) {
//         return TAG + ((o instanceof Class)
//                 ? ((Class) o).getSimpleName() : o.getClass().getSimpleName());
//     }
// }


// Path: library/src/main/java/com/liulishuo/filedownloader/services/ForegroundServiceConfig.java
import android.annotation.TargetApi;
import android.app.Notification;
import android.content.Context;
import com.liulishuo.filedownloader.R;
import com.liulishuo.filedownloader.util.FileDownloadLog;

        builder.setContentTitle(title).setContentText(content)
                .setSmallIcon(DEFAULT_NOTIFICATION_ID);
        return builder.build();
    }

    @Override
    public String toString() {
        return "ForegroundServiceConfig{"
                + "notificationId=" + notificationId
                + ", notificationChannelId='" + notificationChannelId
                + '\''
                + ", notificationChannelName='" + notificationChannelName
                + '\''
                + ", notification=" + notification
                + ", needRecreateChannelId=" + needRecreateChannelId
                + '}';
    }

    public static class Builder {
        private int notificationId;
        private String notificationChannelId;
        private String notificationChannelName;
        private Notification notification;
        private boolean needRecreateChannelId;

        public Builder notificationId(int notificationId) {
            this.notificationId = notificationId;
            return this;
        }

        public Builder notificationChannelId(String notificationChannelId) {