Changeset 209


Ignore:
Timestamp:
05/08/08 14:21:02 (5 years ago)
Author:
saua
Message:

update BBTracker to correct order of track stores

File:
1 edited

Legend:

Unmodified
Added
Removed
  • bbtracker/trunk/src/org/bbtracker/mobile/BBTracker.java

    r164 r209  
    1919 
    2020import java.util.Timer; 
     21import java.util.Vector; 
    2122 
    2223import javax.microedition.lcdui.Alert; 
     
    5960        private static boolean bluetoothAvailable = false; 
    6061 
     62        // #ifndef AVOID_FILE_API 
    6163        private static boolean fileUrlAvailable = false; 
     64 
     65        // #endif 
    6266 
    6367        private final TrackManager trackManager; 
     
    162166        } 
    163167 
     168        // #ifndef AVOID_FILE_API 
    164169        public static boolean isFileUrlAvailable() { 
    165170                return fileUrlAvailable; 
    166171        } 
     172 
     173        // #endif 
    167174 
    168175        protected void destroyApp(final boolean force) throws MIDletStateChangeException { 
     
    227234                        fileUrlAvailable = (fileConnectionVersion != null); 
    228235                        addAPI("File", fileUrlAvailable); 
    229                         // #else 
    230 // @ fileUrlAvailable = false; 
    231236                        // #endif 
    232237 
    233                         final TrackStore[] trackStores = new TrackStore[fileUrlAvailable ? 2 : 1]; 
    234                         trackStores[0] = new RMSTrackStore(); 
     238                        final Vector stores = new Vector(); 
    235239                        // #ifndef AVOID_FILE_API 
    236240                        if (fileUrlAvailable) { 
    237                                 trackStores[1] = new FileTrackStore(); 
     241                                stores.addElement(new FileTrackStore()); 
    238242                        } 
    239243                        // #endif 
     244                        stores.addElement(new RMSTrackStore()); 
     245                        final TrackStore[] trackStores = new TrackStore[stores.size()]; 
     246                        stores.copyInto(trackStores); 
    240247                        final LocationProvider locationProvider; 
    241248 
Note: See TracChangeset for help on using the changeset viewer.