Projects >> Speedometer >>59e17041f2f6ae98d5b398f55c4f5122a6cec347

Chunk
Conflicting content
  public static final long SCHEDULE_POLLING_INTERVAL = 500;
  public static final String INVALID_IP = "";
  
<<<<<<< HEAD
  /** Tasks expire in one day. Expired tasks will be removed from the scheduler */
  public static final long TASK_EXPIRATION_MSEC = 24 * 3600 * 1000;
=======
  /** Constants used in MeasurementScheduler.java */
  // The default checkin interval in seconds
  public static final int DEFAULT_CHECKIN_INTERVAL_SEC = 20;
  public static final long PAUSE_BETWEEN_CHECKIN_CHANGE_SEC = 2L;
  // default minimum battery percentage to run measurements
  public static final int DEFAULT_BATTERY_THRESH_PRECENT = 60;
  
  /** Constants used in BatteryCapPowerManager.java */
  /** The default battery level if we cannot read it from the system */
  public static final int DEFAULT_BATTERY_LEVEL = 0;
  /** The default maximum battery level if we cannot read it from the system */
  public static final int DEFAULT_BATTERY_SCALE = 100;
>>>>>>> 564c78ce3392f4c53013041c2b6a5bc288baffab
}
Solution content
  public static final long SCHEDULE_POLLING_INTERVAL = 500;
  public static final String INVALID_IP = "";
  
  /** Constants used in MeasurementScheduler.java */
  // The default checkin interval in seconds
  public static final int DEFAULT_CHECKIN_INTERVAL_SEC = 20;
  public static final long PAUSE_BETWEEN_CHECKIN_CHANGE_SEC = 2L;
  // default minimum battery percentage to run measurements
  public static final int DEFAULT_BATTERY_THRESH_PRECENT = 60;
  public static final boolean DEFAULT_CHECKIN_ENABLED = true;
  
  /** Constants used in BatteryCapPowerManager.java */
  /** The default battery level if we cannot read it from the system */
  public static final int DEFAULT_BATTERY_LEVEL = 0;
  /** The default maximum battery level if we cannot read it from the system */
  public static final int DEFAULT_BATTERY_SCALE = 100;
  /** Tasks expire in one day. Expired tasks will be removed from the scheduler */
  public static final long TASK_EXPIRATION_MSEC = 24 * 3600 * 1000;
}
File
Config.java
Developer's decision
Manual
Kind of conflict
Attribute
Comment
Chunk
Conflicting content
 * @author wenjiezeng@google.com (Steve Zeng)
 */
public class MeasurementScheduler extends Service {
<<<<<<< HEAD

  // The default checkin interval in seconds
  private static final boolean DEFAULT_CHECKIN_ENABLED = false;
  private static final int DEDAULT_CHECKIN_INTERVAL_SEC = 2 * 60;
  private static final long PAUSE_BETWEEN_CHECKIN_CHANGE_SEC = 2L;
  //default minimum battery percentage to run measurements
  private static final int DEFAULT_BATTERY_THRES_PRECENT = 60;
=======
>>>>>>> 564c78ce3392f4c53013041c2b6a5bc288baffab
  
  private ScheduledThreadPoolExecutor measurementExecutor;
  private Handler receiver;
Solution content
 * @author wenjiezeng@google.com (Steve Zeng)
 */
public class MeasurementScheduler extends Service {
  
  private ScheduledThreadPoolExecutor measurementExecutor;
  private Handler receiver;
File
MeasurementScheduler.java
Developer's decision
Version 2
Kind of conflict
Attribute
Comment
Chunk
Conflicting content
  public void onCreate() {
    PhoneUtils.setGlobalContext(this.getApplicationContext());
    this.checkin = new Checkin(this);
<<<<<<< HEAD
=======
    this.checkinIntervalSec = Config.DEFAULT_CHECKIN_INTERVAL_SEC;
>>>>>>> 564c78ce3392f4c53013041c2b6a5bc288baffab
    this.checkinFuture = null;
    this.checkinTask = new CheckinTask();
    this.checkinExecutor = Executors.newScheduledThreadPool(1);
Solution content
  public void onCreate() {
    PhoneUtils.setGlobalContext(this.getApplicationContext());
    this.checkin = new Checkin(this);
    this.checkinFuture = null;
    this.checkinTask = new CheckinTask();
    this.checkinExecutor = Executors.newScheduledThreadPool(1);
File
MeasurementScheduler.java
Developer's decision
Version 1
Kind of conflict
Attribute
Chunk
Conflicting content
        new ConcurrentHashMap>();
    this.cancelExecutor = Executors.newScheduledThreadPool(1);
    
<<<<<<< HEAD
    updateFromPreference();
=======
    this.powerManager = new BatteryCapPowerManager(Config.DEFAULT_BATTERY_THRESH_PRECENT, this);
>>>>>>> 564c78ce3392f4c53013041c2b6a5bc288baffab
  }
  
  @Override 
Solution content
        new ConcurrentHashMap>();
    this.cancelExecutor = Executors.newScheduledThreadPool(1);
    
    this.powerManager = new BatteryCapPowerManager(Config.DEFAULT_BATTERY_THRESH_PRECENT, this);
    updateFromPreference();
  }
  
  @Override 
File
MeasurementScheduler.java
Developer's decision
Concatenation
Kind of conflict
Attribute
Method invocation