Skip to content

Commit

Permalink
Null error handling to SyncService
Browse files Browse the repository at this point in the history
  • Loading branch information
jkasten2 committed Apr 27, 2017
1 parent 3910548 commit 58cbfce
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -285,7 +285,7 @@ private Set<String> getGroupChangeFields(UserState changedTo) {
|| syncValues.optDouble("lat") != changedTo.syncValues.getDouble("lat")
|| syncValues.optDouble("long") != changedTo.syncValues.getDouble("long")
|| syncValues.optDouble("loc_acc") != changedTo.syncValues.getDouble("loc_acc")
|| syncValues.optDouble("loc_type") != changedTo.syncValues.getDouble("loc_type")) {
|| syncValues.optInt("loc_type") != changedTo.syncValues.optInt("loc_type")) {
if (changedTo.dependValues.optBoolean("loc_bg"))
changedTo.syncValues.put("loc_bg", changedTo.dependValues.optBoolean("loc_bg"));
return LOCATION_FIELDS_SET;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -100,12 +100,15 @@ public void complete(LocationGMS.LocationPoint point) {

@Override
public void onCreate() {

}

@Override
public int onStartCommand(Intent intent, int flags, int startId) {
int task = intent.getIntExtra("task", 0);
int task;
if (intent != null)
task = intent.getIntExtra("task", 0);
else
task = TASK_SYNC;

if (task == TASK_APP_STARTUP)
startedFromActivity = true;
Expand Down

0 comments on commit 58cbfce

Please sign in to comment.