con.setConnectTimeout(Constants.FIRMWARE_UPGRADE_CONNECTIVITY_TIMEOUT);
con.setReadTimeout(Constants.FIRMWARE_UPGRADE_READ_TIMEOUT);
return (long) con.getContentLength();
} catch (SocketTimeoutException e) {
String message = "Connection failure (Socket timeout) when retrieving update package size.";
<BUG>Log.e(TAG, message + e);
sendBroadcast(Constants.Operation.GET_FIRMWARE_UPGRADE_PACKAGE_STATUS,
Constants.Status.CONNECTION_FAILED, message);</BUG>
CommonUtils.callAgentApp(context, Constants.Operation.FAILED_FIRMWARE_UPGRADE_NOTIFICATION, 0, null);
return (long) -1;

con.setConnectTimeout(Constants.FIRMWARE_UPGRADE_CONNECTIVITY_TIMEOUT);
con.setReadTimeout(Constants.FIRMWARE_UPGRADE_READ_TIMEOUT);
return (long) con.getContentLength();
} catch (SocketTimeoutException e) {
String message = "Connection failure (Socket timeout) when retrieving update package size.";
Log.e(TAG, message + e);
CommonUtils.sendBroadcast(context, operation, Constants.Code.FAILURE, Constants.Status.CONNECTION_FAILED, message);
CommonUtils.callAgentApp(context, Constants.Operation.FAILED_FIRMWARE_UPGRADE_NOTIFICATION, 0, null);
return (long) -1;
