private void insertNewDriveFiles() throws IOException {
  Cursor cursor=null;
  try {
    cursor=myTracksProviderUtils.getTrackCursor(SyncUtils.NO_DRIVE_ID_TRACKS_QUERY,null,null);
    long recordingTrackId=PreferencesUtils.getLong(context,R.string.recording_track_id_key);
    if (cursor != null && cursor.moveToFirst()) {
      do {
        Track track=myTracksProviderUtils.createTrack(cursor);
        if (track.getId() == recordingTrackId) {
          continue;
        }
        SyncUtils.insertDriveFile(drive,folderId,context,myTracksProviderUtils,track,true,true);
      }
 while (cursor.moveToNext());
    }
  }
  finally {
    if (cursor != null) {
      cursor.close();
    }
  }
}

private void insertNewDriveFiles ( ) throws IOException { Cursor cursor = null ; try { cursor = myTracksProviderUtils . getTrackCursor ( SyncUtils . NO_DRIVE_ID_TRACKS_QUERY , null , null ) ; long recordingTrackId = PreferencesUtils . getLong ( context , R . string . recording_track_id_key ) ; if ( cursor != null && cursor . moveToFirst ( ) ) { do { Track track = myTracksProviderUtils . createTrack ( cursor ) ; if ( track . getId ( ) == recordingTrackId ) { continue ; } SyncUtils . insertDriveFile ( drive , folderId , context , myTracksProviderUtils , track , true , true ) ; } while ( cursor . moveToNext ( ) ) ; } } finally { if ( cursor != null ) { cursor . close ( ) ; } } }
inserts new drive files from tracks without a drive id .
