/[projects]/android/TrainInfo/src/main/java/dk/thoerup/traininfo/WelcomeScreen.java
ViewVC logotype

Diff of /android/TrainInfo/src/main/java/dk/thoerup/traininfo/WelcomeScreen.java

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1571 by torben, Sat Jul 9 08:31:26 2011 UTC revision 1594 by torben, Wed Aug 31 20:23:36 2011 UTC
# Line 127  public class WelcomeScreen extends Activ Line 127  public class WelcomeScreen extends Activ
127          protected void onDestroy() {          protected void onDestroy() {
128                  super.onDestroy();                  super.onDestroy();
129                  if (stationLoader != null) {                  if (stationLoader != null) {
130                          stationLoader.cancel(false);                          stationLoader.cancel(true);
131                  }                  }
132                                    
133                  ProviderFactory.purgeOldEntries(); //exiting application, do some cleanup                  ProviderFactory.purgeOldEntries(); //exiting application, do some cleanup
# Line 199  public class WelcomeScreen extends Activ Line 199  public class WelcomeScreen extends Activ
199                                    
200                  @Override                  @Override
201                  public void onClick(View v) {                  public void onClick(View v) {
202                            
203                            StationProvider sp = ProviderFactory.getStationProvider();
204                            
205                            if (sp instanceof OfflineStationProvider ) {
206                                    OfflineStationProvider osp = (OfflineStationProvider) sp;
207                                    
208                                    if (! osp.hasStations()) {
209                                            stationLoader = new StationLoader(osp);
210                                            stationLoader.execute( (Void)null);    
211                                            return;
212                                    }
213                            }
214                            
215                          Intent intent = new Intent(WelcomeScreen.this, StationList.class);                          Intent intent = new Intent(WelcomeScreen.this, StationList.class);
216                          intent.putExtra("type", launchType);                          intent.putExtra("type", launchType);
217                          WelcomeScreen.this.startActivity(intent);                          WelcomeScreen.this.startActivity(intent);

Legend:
Removed from v.1571  
changed lines
  Added in v.1594

  ViewVC Help
Powered by ViewVC 1.1.20