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

Commit f191a78b authored by Vincent Bourgmayer's avatar Vincent Bourgmayer
Browse files

fix commonParameter initialized too early issue for Archive PATH

parent d7890dae
Loading
Loading
Loading
Loading
+10 −0
Original line number Diff line number Diff line
@@ -17,7 +17,9 @@
package ecorp.easy.installer.controllers.subcontrollers;


import ecorp.easy.installer.AppConstants;
import ecorp.easy.installer.controllers.MainWindowController;
import ecorp.easy.installer.tasks.CommandExecutionTask;
import ecorp.easy.installer.tasks.DownloadTask;
import ecorp.easy.installer.utils.UiUtils;
import java.net.URL;
@@ -120,6 +122,14 @@ public class DownloadSrcController extends AbstractSubController {
        preparationProgressBar.setProgress(1.0); //BUG! apparement pas accessible par le service. J'ai un "A bound value cannot be set"
        progressLabel.setText(i18n.getString("download_lbl_complete"));
        progressTitle.setVisible(false);
        
        //need to update/add CommandExecutionTask.CommonParameters at this time..
        //But I'm not sure it's the best place to do that.
        //I don't like to add dependency to CommandExecutionTask just for that
        String sourcesFolderPath = AppConstants.getSourcesFolderPath();
        CommandExecutionTask.updateCommonParam("TWRP_IMAGE_PATH", sourcesFolderPath+AppConstants.getTwrpImgPath());
        CommandExecutionTask.updateCommonParam("ARCHIVE_PATH", sourcesFolderPath+AppConstants.getEArchivePath());
        
        parentController.disableNextButton(false);
    }
    
+0 −2
Original line number Diff line number Diff line
@@ -50,8 +50,6 @@ public class CommandExecutionTask extends Task<CommandExecutionResult> {
        final String sourcePath = AppConstants.getSourcesFolderPath();
        
        COMMON_PARAMS.put("SOURCES_PATH", sourcePath);
        COMMON_PARAMS.put("TWRP_IMAGE_PATH", sourcePath+AppConstants.getTwrpImgPath());
        COMMON_PARAMS.put("ARCHIVE_PATH", sourcePath+AppConstants.getEArchivePath());
        COMMON_PARAMS.put("ADB_FOLDER_PATH", AppConstants.getADBFolderPath());
        COMMON_PARAMS.put("HEIMDALL_FOLDER_PATH", AppConstants.getHeimdallFolderPath());
        COMMON_PARAMS.put("JAVA_FOLDER_PATH", AppConstants.JavaHome);