예제 #1
0
파일: GetVersion.java 프로젝트: fin-nick/fj
 public static void checkUpdates() {
   if (Options.getBoolean(Options.OPTION_CHECK_UPDATES) && !hasNewVersion()) {
     final int today = (int) (System.currentTimeMillis() / (24L * 60 * 60 * 1000));
     final int nextCheck = Options.getInt(Options.OPTION_UPDATE_CHECK_TIME);
     if (nextCheck <= today) {
       new GetVersion(TYPE_DATE).get();
       final int nextDay = today + CHECK_UPDATES_INTERVAL;
       Options.setInt(Options.OPTION_UPDATE_CHECK_TIME, nextDay);
       Options.safeSave();
     }
   }
 }
예제 #2
0
파일: GetVersion.java 프로젝트: fin-nick/fj
 public static boolean showUpdates() {
   if (Options.getBoolean(Options.OPTION_CHECK_UPDATES) && hasNewVersion()) {
     final int today = (int) (System.currentTimeMillis() / (24L * 60 * 60 * 1000));
     final int nextCheck = Options.getInt(Options.OPTION_UPDATE_CHECK_TIME);
     if (nextCheck <= today) {
       final int nextDay = today + SHOW_NEW_VERSION_INTERVAL;
       Options.setInt(Options.OPTION_UPDATE_CHECK_TIME, nextDay);
       Options.safeSave();
       return true;
     }
   }
   return false;
 }