Commit 1eb56010 by Kunj Gupta

Fixed - App is crashing because of removed HRCase option from Home Screen.

parent 216ba3ae
...@@ -33,6 +33,7 @@ import com.vsoft.servicenow.utils.CatalogueLog; ...@@ -33,6 +33,7 @@ import com.vsoft.servicenow.utils.CatalogueLog;
import com.vsoft.servicenow.utils.Constants; import com.vsoft.servicenow.utils.Constants;
import com.vsoft.servicenow.db.DBConstants; import com.vsoft.servicenow.db.DBConstants;
import com.vsoft.servicenow.utils.PrefManager; import com.vsoft.servicenow.utils.PrefManager;
import com.vsoft.servicenow.utils.Util;
import org.json.JSONException; import org.json.JSONException;
import org.json.JSONObject; import org.json.JSONObject;
...@@ -97,22 +98,28 @@ public class SyncService extends IntentService { ...@@ -97,22 +98,28 @@ public class SyncService extends IntentService {
if(Constants.DEBUG) CatalogueLog.d("startSync: result of syncing attachment "+i+": "+result); if(Constants.DEBUG) CatalogueLog.d("startSync: result of syncing attachment "+i+": "+result);
} }
/*Then we will work on dirty variable form*/ if(Util.isHrCaseEnabled()) {
List<HRCaseItemInput> hrCaseItemInputList = HRCaseItemInputManager.getDirtyItemInput(); /*Then we will work on dirty variable form*/
if(Constants.DEBUG) CatalogueLog.d("startSync: HRCase form to sync: "+hrCaseItemInputList.size()); List<HRCaseItemInput> hrCaseItemInputList = HRCaseItemInputManager.getDirtyItemInput();
for (int i = 0; i < hrCaseItemInputList.size(); i++) { if (Constants.DEBUG)
HRCaseItemInput hrCaseItemInput = hrCaseItemInputList.get(i); CatalogueLog.d("startSync: HRCase form to sync: " + hrCaseItemInputList.size());
result = syncHRCaseVariableForm(hrCaseItemInput); for (int i = 0; i < hrCaseItemInputList.size(); i++) {
if(Constants.DEBUG) CatalogueLog.d("startSync: result of syncing hrCaseItemInput "+i+": "+result); HRCaseItemInput hrCaseItemInput = hrCaseItemInputList.get(i);
} result = syncHRCaseVariableForm(hrCaseItemInput);
if (Constants.DEBUG)
CatalogueLog.d("startSync: result of syncing hrCaseItemInput " + i + ": " + result);
}
/*Then we will work on dirty HRCase attachment*/ /*Then we will work on dirty HRCase attachment*/
List<HRCaseAttachment> hrCaseAttachmentList = HRCaseAttachmentManager.getDirtyHRCaseAttachment(); List<HRCaseAttachment> hrCaseAttachmentList = HRCaseAttachmentManager.getDirtyHRCaseAttachment();
if(Constants.DEBUG) CatalogueLog.d("startSync: HRCaseAttachment to sync: "+hrCaseAttachmentList.size()); if (Constants.DEBUG)
for (int i = 0; i < hrCaseAttachmentList.size(); i++) { CatalogueLog.d("startSync: HRCaseAttachment to sync: " + hrCaseAttachmentList.size());
HRCaseAttachment hrCaseAttachment = hrCaseAttachmentList.get(i); for (int i = 0; i < hrCaseAttachmentList.size(); i++) {
result = syncHRCaseAttachment(hrCaseAttachment); HRCaseAttachment hrCaseAttachment = hrCaseAttachmentList.get(i);
if(Constants.DEBUG) CatalogueLog.d("startSync: result of syncing hrCaseAttachment "+i+": "+result); result = syncHRCaseAttachment(hrCaseAttachment);
if (Constants.DEBUG)
CatalogueLog.d("startSync: result of syncing hrCaseAttachment " + i + ": " + result);
}
} }
/*Then we will work on dirty incident form*/ /*Then we will work on dirty incident form*/
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment