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

Commit 3bc5c6bb authored by Vincent Bourgmayer's avatar Vincent Bourgmayer
Browse files

fixed DonwloadSrcController to use RomSource map instead of <String,String> map

parent 7a0690f6
Loading
Loading
Loading
Loading
+13 −4
Original line number Diff line number Diff line
@@ -91,8 +91,9 @@ public class DownloadSrcController extends AbstractSubController {
        if(sourceIterator.hasNext()){
            HashMap.Entry<String, RomSource> source = sourceIterator.next();
            
            currentService = new DownloadService(source.getKey(), source.getValue());
            currentService = new DownloadService(source.getValue());
            bindProgressUIToService(currentService);
            
            currentService.start();
            return true;
        }
@@ -179,16 +180,24 @@ public class DownloadSrcController extends AbstractSubController {
     */
    private class DownloadService extends Service{
        
        RomSource source;
        private RomSource source;


        public DownloadService(final RomSource source){
            this.source = source;
        }

        /**
         * Change the source to download to a new one
         * @param source 
         */
        public void setSource(RomSource source) {
            this.source = source;
        }
        
        @Override
        protected Task createTask() {
            logger.info("DownloadService.createTask({},{})", source.getUrl(), source.getFileName());
            return new DownloadTask(source.getUrl(), source.getFileName(), i18n);
            return new DownloadTask(source, i18n);
        }
        
        @Override