/[projects]/android/People/src/com/grundfos/android/people/PeopleList.java
ViewVC logotype

Diff of /android/People/src/com/grundfos/android/people/PeopleList.java

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

revision 228 by torben, Tue Aug 4 13:16:25 2009 UTC revision 229 by torben, Tue Aug 4 14:14:14 2009 UTC
# Line 33  public class PeopleList extends ListActi Line 33  public class PeopleList extends ListActi
33          public static final int DOWNLOAD = 1010;          public static final int DOWNLOAD = 1010;
34          public static final int ABOUT = 1011;          public static final int ABOUT = 1011;
35                    
36            public static final int DOWNLOAD_SUCCESS = 0;
37            public static final int DOWNLOAD_FAILED = 1;
38            
39          public static final String PREF_LAST_DB_UPDATE = "LastDbUpdate";          public static final String PREF_LAST_DB_UPDATE = "LastDbUpdate";
40          public static final String PREFS = "PeoplePrefs";          public static final String PREFS = "PeoplePrefs";
41                    
# Line 198  public class PeopleList extends ListActi Line 201  public class PeopleList extends ListActi
201          @Override          @Override
202          public void handleMessage(Message msg) {          public void handleMessage(Message msg) {
203                  dialog.dismiss();                  dialog.dismiss();
204              if (msg.what == 0) { //success              if (msg.what == DOWNLOAD_SUCCESS) {
205                  Date d = new Date();                  Date d = new Date();
206                                    
207                  SharedPreferences settings = getSharedPreferences(PREFS, 0);                  SharedPreferences settings = getSharedPreferences(PREFS, 0);
# Line 218  public class PeopleList extends ListActi Line 221  public class PeopleList extends ListActi
221                          try                          try
222                          {                          {
223                                  peopleDB.loadData();                                  peopleDB.loadData();
224                          dbUpdateHandler.sendEmptyMessage(0);                          dbUpdateHandler.sendEmptyMessage(DOWNLOAD_SUCCESS);
225                          } catch (Exception e) {                          } catch (Exception e) {
226                                  dbUpdateHandler.sendEmptyMessage(1);                                  dbUpdateHandler.sendEmptyMessage(DOWNLOAD_FAILED);
227                          }                                        }              
228                  }                  }
229      };      };

Legend:
Removed from v.228  
changed lines
  Added in v.229

  ViewVC Help
Powered by ViewVC 1.1.20