| Chunk |
|---|
| Conflicting content |
|---|
/** Set the interval for checkin in seconds */
public synchronized void setCheckinInterval(long interval) {
<<<<<<< HEAD
this.checkinIntervalSec = interval;
// the new checkin schedule will start in PAUSE_BETWEEN_CHECKIN_CHANGE_MSEC seconds
alarmManager.setRepeating(AlarmManager.RTC_WAKEUP,
System.currentTimeMillis() + Config.PAUSE_BETWEEN_CHECKIN_CHANGE_MSEC,
checkinIntervalSec * 1000, checkinIntentSender);
Log.i(SpeedometerApp.TAG, "Setting checkin interval to " + interval + " seconds");
=======
this.checkinIntervalSec = Math.max(Config.MIN_CHECKIN_INTERVAL_SEC, interval);
if (this.checkinFuture != null) {
this.checkinFuture.cancel(true);
// the new checkin schedule will start in PAUSE_BETWEEN_CHECKIN_CHANGE_SEC seconds
this.checkinFuture = checkinExecutor.scheduleAtFixedRate(this.checkinTask,
Config.PAUSE_BETWEEN_CHECKIN_CHANGE_SEC, this.checkinIntervalSec, TimeUnit.SECONDS);
Log.i(SpeedometerApp.TAG, "Setting checkin interval to " + interval + " seconds");
}
>>>>>>> 2d7c0959c1acd94b8875c5d4722a051f632213ad
}
/** Returns the checkin interval of the scheduler in seconds */ |
| Solution content |
|---|
/** Set the interval for checkin in seconds */
public synchronized void setCheckinInterval(long interval) {
this.checkinIntervalSec = Math.max(Config.MIN_CHECKIN_INTERVAL_SEC, interval);
// the new checkin schedule will start in PAUSE_BETWEEN_CHECKIN_CHANGE_MSEC seconds
checkinIntentSender = PendingIntent.getBroadcast(this, 0,
new UpdateIntent("", UpdateIntent.CHECKIN_ACTION), PendingIntent.FLAG_CANCEL_CURRENT);
alarmManager.setRepeating(AlarmManager.RTC_WAKEUP,
System.currentTimeMillis() + Config.PAUSE_BETWEEN_CHECKIN_CHANGE_MSEC,
checkinIntervalSec * 1000, checkinIntentSender);
Log.i(SpeedometerApp.TAG, "Setting checkin interval to " + interval + " seconds");
}
/** Returns the checkin interval of the scheduler in seconds */ |
| File |
|---|
| MeasurementScheduler.java |
| Developer's decision |
|---|
| Manual |
| Kind of conflict |
|---|
| Attribute |
| Comment |
| If statement |
| Method invocation |
| Variable |
| Chunk |
|---|
| Conflicting content |
|---|
pendingTasks.size() >= Config.MAX_TASK_QUEUE_SIZE) {
return false;
}
<<<<<<< HEAD
boolean result = this.taskQueue.add(task);
if (task.getDescription().priority == MeasurementTask.USER_PRIORITY) {
handleMeasurement();
}
return result;
=======
//Automatically notifies the scheduler waiting on taskQueue.take()
return this.taskQueue.add(task);
>>>>>>> 2d7c0959c1acd94b8875c5d4722a051f632213ad
} catch (NullPointerException e) {
Log.e(SpeedometerApp.TAG, "The task to be added is null");
return false; |
| Solution content |
|---|
pendingTasks.size() >= Config.MAX_TASK_QUEUE_SIZE) {
return false;
}
boolean result = this.taskQueue.add(task);
if (task.getDescription().priority == MeasurementTask.USER_PRIORITY) {
handleMeasurement();
}
return result;
} catch (NullPointerException e) {
Log.e(SpeedometerApp.TAG, "The task to be added is null");
return false; |
| File |
|---|
| MeasurementScheduler.java |
| Developer's decision |
|---|
| Version 1 |
| Kind of conflict |
|---|
| Comment |
| If statement |
| Method invocation |
| Return statement |
| Variable |