private void fillTrackPoint(Cursor cursor,CachedTrackPointsIndexes indexes,Location location){
  location.reset();
  if (!cursor.isNull(indexes.longitudeIndex)) {
    location.setLongitude(((double)cursor.getInt(indexes.longitudeIndex)) / 1E6);
  }
  if (!cursor.isNull(indexes.latitudeIndex)) {
    location.setLatitude(((double)cursor.getInt(indexes.latitudeIndex)) / 1E6);
  }
  if (!cursor.isNull(indexes.timeIndex)) {
    location.setTime(cursor.getLong(indexes.timeIndex));
  }
  if (!cursor.isNull(indexes.altitudeIndex)) {
    location.setAltitude(cursor.getFloat(indexes.altitudeIndex));
  }
  if (!cursor.isNull(indexes.accuracyIndex)) {
    location.setAccuracy(cursor.getFloat(indexes.accuracyIndex));
  }
  if (!cursor.isNull(indexes.speedIndex)) {
    location.setSpeed(cursor.getFloat(indexes.speedIndex));
  }
  if (!cursor.isNull(indexes.bearingIndex)) {
    location.setBearing(cursor.getFloat(indexes.bearingIndex));
  }
  if (location instanceof MyTracksLocation && !cursor.isNull(indexes.sensorIndex)) {
    MyTracksLocation myTracksLocation=(MyTracksLocation)location;
    try {
      myTracksLocation.setSensorDataSet(SensorDataSet.parseFrom(cursor.getBlob(indexes.sensorIndex)));
    }
 catch (    InvalidProtocolBufferException e) {
      Log.w(TAG,"Failed to parse sensor data.",e);
    }
  }
}

private void fillTrackPoint ( Cursor cursor , CachedTrackPointsIndexes indexes , Location location ) { location . reset ( ) ; if ( ! cursor . isNull ( indexes . longitudeIndex ) ) { location . setLongitude ( ( ( double ) cursor . getInt ( indexes . longitudeIndex ) ) / 1E6 ) ; } if ( ! cursor . isNull ( indexes . latitudeIndex ) ) { location . setLatitude ( ( ( double ) cursor . getInt ( indexes . latitudeIndex ) ) / 1E6 ) ; } if ( ! cursor . isNull ( indexes . timeIndex ) ) { location . setTime ( cursor . getLong ( indexes . timeIndex ) ) ; } if ( ! cursor . isNull ( indexes . altitudeIndex ) ) { location . setAltitude ( cursor . getFloat ( indexes . altitudeIndex ) ) ; } if ( ! cursor . isNull ( indexes . accuracyIndex ) ) { location . setAccuracy ( cursor . getFloat ( indexes . accuracyIndex ) ) ; } if ( ! cursor . isNull ( indexes . speedIndex ) ) { location . setSpeed ( cursor . getFloat ( indexes . speedIndex ) ) ; } if ( ! cursor . isNull ( indexes . bearingIndex ) ) { location . setBearing ( cursor . getFloat ( indexes . bearingIndex ) ) ; } if ( location instanceof MyTracksLocation && ! cursor . isNull ( indexes . sensorIndex ) ) { MyTracksLocation myTracksLocation = ( MyTracksLocation ) location ; try { myTracksLocation . setSensorDataSet ( SensorDataSet . parseFrom ( cursor . getBlob ( indexes . sensorIndex ) ) ) ; } catch ( InvalidProtocolBufferException e ) { Log . w ( TAG , "Failed to parse sensor data." , e ) ; } } }
fills a track point from a cursor .
