try {
otaServerManager = new OTAServerManager(this.context);
otaServerManager.setStateChangeListener(this);
} catch (MalformedURLException e) {
otaServerManager = null;
<BUG>String message = "Firmware upgrade URL provided is not valid.";
sendBroadcast(Constants.Operation.GET_FIRMWARE_UPGRADE_PACKAGE_STATUS,

Constants.Status.MALFORMED_OTA_URL, message);</BUG>
CommonUtils.callAgentApp(context, Constants.Operation.

try {
otaServerManager = new OTAServerManager(this.context);
otaServerManager.setStateChangeListener(this);
} catch (MalformedURLException e) {
otaServerManager = null;
String message = "Firmware upgrade URL provided is not valid.";
if (Preference.getBoolean(context, context.getResources().getString(R.string.
firmware_status_check_in_progress))) {
CommonUtils.sendBroadcast(context, Constants.Operation.GET_FIRMWARE_UPGRADE_PACKAGE_STATUS, Constants.Code.FAILURE,
Constants.Status.MALFORMED_OTA_URL, message);
} else {
CommonUtils.sendBroadcast(context, Constants.Operation.UPGRADE_FIRMWARE, Constants.Code.FAILURE,
Constants.Status.MALFORMED_OTA_URL, message);
CommonUtils.callAgentApp(context, Constants.Operation.
