package com.novoda.downloadmanager.demo;

import android.app.Application;
import android.os.Handler;
import android.os.Looper;

import com.facebook.stetho.Stetho;
import com.novoda.downloadmanager.DownloadsPersistence;
import com.novoda.downloadmanager.FileDownloader;
import com.novoda.downloadmanager.FileSizeRequester;
import com.novoda.downloadmanager.DownloadManagerBuilder;
import com.novoda.downloadmanager.LiteDownloadManagerCommands;
import com.novoda.downloadmanager.NotificationCreator;

import java.util.concurrent.TimeUnit;

public class DemoApplication extends Application {

    private volatile LiteDownloadManagerCommands liteDownloadManagerCommands;

    @Override
    public void onCreate() {
        super.onCreate();
        Stetho.initializeWithDefaults(this);
        createLiteDownloadManager();
    }

    private void createLiteDownloadManager() {
        FileSizeRequester fileSizeRequester = new CustomFileSizeRequester();
        FileDownloader fileDownloader = new CustomFileDownloader();
        DownloadsPersistence downloadsPersistence = new CustomDownloadsPersistence();
        NotificationCreator notificationCreator = new CustomNotificationCreator(this, R.mipmap.ic_launcher_round);

        Handler handler = new Handler(Looper.getMainLooper());

        liteDownloadManagerCommands = DownloadManagerBuilder
                .newInstance(this, handler, R.mipmap.ic_launcher_round)
                .withFileDownloaderCustom(fileSizeRequester, fileDownloader)
                .withFilePersistenceExternal()
                .withFilePersistenceCustom(CustomFilePersistence.class)
                .withDownloadsPersistenceCustom(downloadsPersistence)
                .withNotification(notificationCreator)
                .withNetworkRecovery(false)
                .withCallbackThrottleCustom(CustomCallbackThrottle.class)
                .withCallbackThrottleByTime(TimeUnit.SECONDS, 3)
                .withCallbackThrottleByProgressIncrease()
                .build();
    }

    public LiteDownloadManagerCommands getLiteDownloadManagerCommands() {
        return liteDownloadManagerCommands;
    }
}

@@ -156,16 +156,74 @@
 Stetho;%0A
+import com.novoda.downloadmanager.DownloadManagerBuilder;%0A
 import c
@@ -270,16 +270,16 @@
 stence;%0A
-
 import c
@@ -377,66 +377,8 @@
 er;%0A
-import com.novoda.downloadmanager.DownloadManagerBuilder;%0A
 impo
@@ -436,16 +436,16 @@
 mmands;%0A
+
 import c
@@ -496,47 +496,8 @@
 r;%0A%0A
-import java.util.concurrent.TimeUnit;%0A%0A
 publ
@@ -1664,222 +1664,28 @@
 ithN
-otification(notificationCreator)%0A                .withNetworkRecovery(false)%0A                .withCallbackThrottleCustom(CustomCallbackThrottle.class)%0A                .withCallbackThrottleByTime(TimeUnit.SECONDS, 3
+etworkRecovery(false
 )%0A  

Remove custom implementations from DemoApplication.