package com.ubt.jimu.blockly; import android.text.TextUtils; import com.ubt.jimu.JimuApplication; import com.ubt.jimu.blockly.bean.BlocklyProject; import com.ubt.jimu.diy.DiyRobotDbHandler; import com.ubt.jimu.unity.ModelType; import com.ubt.jimu.utils.ExternalOverFroyoUtils; import java.io.File; /* loaded from: classes.dex */ public class JimuRobot { public static final String ACTIONS = "actions="; public static final String BLUE_STATE = "blueState="; public static final String CIRCLE_SERVOS = "circleServos="; public static final String CUSTOM_MODEL_PROJECT = "data/blockly/xml/project/"; public static final String CUSTOM_SOUND_PATH = "data/blockly/sounds/custom/"; public static final String GYROSCOPE_ID = "gyroscopeId="; public static final String INFRARED_ID = "infraredId="; public static final String IS_FIRST = "isFirst="; public static final String LANGUAGE = "languageCode="; public static final String LIGHTS = "lights="; public static final String MODEL_TYPE = "modelType="; public static final String SAMPLE_MODEL = "0"; private static final String SAMPLE_PROJECT_PATH = "data/blockly/Blockly/defaultProjects/"; private static final String SAMPLE_SOUND_PATH = "data/blockly/Blockly/project/ionicPopup/soundEffects/source/"; public static final String SERVOS = "servos="; public static final String SOUNDS = "list.config"; public static final String TOUCH_ID = "touchId="; public static final String USER_DIY_MODEL = "1"; private String action; private String blocklyProject; private int blueState; private String circleServos; private String colorId; private String customSounds; private boolean edit; private String gyroscopeId; private String infraredId; private String isLithium; private String lights; private String modelID; private long modelServerId; private String modelType; private String motion; private String motor; private BlocklyProject program; private String sampleProject; private String sampleSounds; private String servo; private String touchId; private String ultrasonicId; private String unicornId; private int userId; private String xmlId; public int firstOpen() { return 0; } public String getAction() { return this.action; } public String getBlocklyProject(String str) { String str2; StringBuilder sb = new StringBuilder(); sb.append(ModelType.DEFAULT.getType() - 1); sb.append(""); if (sb.toString().equals(this.modelType)) { str2 = DiyRobotDbHandler.getDefaultModelPath() + getModelId() + File.separator + getModelId(); } else { str2 = DiyRobotDbHandler.getCustomModelPath() + getModelId() + File.separator + getModelId(); } if ("newBlockly".equals(str)) { str2 = str2 + Utils.BLOCKLY_ADD_PATH; } return str2 + File.separator; } public int getBlueState() { return this.blueState; } public String getCircleServos() { if (!TextUtils.isEmpty(this.circleServos)) { this.circleServos = this.circleServos.replace(",", "|"); } return this.circleServos; } public String getColorId() { if (!TextUtils.isEmpty(this.colorId)) { this.colorId = this.colorId.replace(",", "|"); } return this.colorId; } public String getCustomSounds() { if (TextUtils.isEmpty(this.customSounds)) { this.customSounds = DiyRobotDbHandler.getCustomSoundsPath(); } return this.customSounds; } public String getGyroscopeId() { if (!TextUtils.isEmpty(this.gyroscopeId)) { this.gyroscopeId = this.gyroscopeId.replace(",", "|"); } return this.gyroscopeId; } public String getInfraredId() { if (!TextUtils.isEmpty(this.infraredId)) { this.infraredId = this.infraredId.replace(",", "|"); } return this.infraredId; } public String getIsLithium() { return this.isLithium; } public String getLights() { if (!TextUtils.isEmpty(this.lights)) { this.lights = this.lights.replace(",", "|"); } return this.lights; } public String getModelId() { return this.modelID; } public String getModelType() { return this.modelType; } public String getMotion() { return this.motion; } public String getMotor() { if (!TextUtils.isEmpty(this.motor)) { this.motor = this.motor.replace(",", "|"); } return this.motor; } public BlocklyProject getProgram() { return this.program; } public String getSamplePath() { this.sampleProject = ExternalOverFroyoUtils.a(JimuApplication.l(), ModelType.DEFAULT) + getModelId() + File.separator + getModelId(); this.sampleProject += Utils.BLOCKLY_ADD_PATH; this.sampleProject += File.separator; return this.sampleProject; } public String getSampleSounds() { if (TextUtils.isEmpty(this.sampleSounds)) { this.sampleSounds = ExternalOverFroyoUtils.a(JimuApplication.l(), (ModelType) null) + SAMPLE_SOUND_PATH; } return this.sampleSounds; } public long getServerModelId() { return this.modelServerId; } public String getServerModelType() { return (Integer.parseInt(this.modelType) + 1) + ""; } public String getServo() { if (!TextUtils.isEmpty(this.servo)) { this.servo = this.servo.replace(",", "|"); } return this.servo; } public String getTouchId() { if (!TextUtils.isEmpty(this.touchId)) { this.touchId = this.touchId.replace(",", "|"); } return this.touchId; } public String getUltrasonicId() { if (!TextUtils.isEmpty(this.ultrasonicId)) { this.ultrasonicId = this.ultrasonicId.replace(",", "|"); } return this.ultrasonicId; } public String getUnicornId() { if (!TextUtils.isEmpty(this.unicornId)) { this.unicornId = this.unicornId.replace(",", "|"); } return this.unicornId; } public int getUserId() { return this.userId; } public String getXmlId() { return this.xmlId; } public boolean isEdit() { return this.edit; } public void setBlueState(int i) { this.blueState = i; } public void setCircleServos(String str) { this.circleServos = str; } public void setColorId(String str) { this.colorId = str; } public void setGyroscopeId(String str) { this.gyroscopeId = str; } public void setInfraredId(String str) { this.infraredId = str; } public void setIsLithium(String str) { this.isLithium = str; } public void setLights(String str) { this.lights = str; } public void setMotor(String str) { this.motor = str; } public void setServerModelId(long j) { this.modelServerId = j; } public void setServo(String str) { this.servo = str; } public void setTouchId(String str) { this.touchId = str; } public void setUltrasonicId(String str) { this.ultrasonicId = str; } public void setUnicornId(String str) { this.unicornId = str; } }