Ejemplo n.º 1
0
    private void removeFilesFromDatabase() throws IOException {
      if (canContinue && filesToRemove.size() > 0) {
        for (int i = 0; canContinue && i < filesToRemove.size(); i++) {

          removeFileFromDatabase(filesToRemove.get(i));
        }
        AppBroadcaster.broadcast(scontext.getContext(), AppBroadcaster.DB_SYNC_CHANGED);
      }
    }
Ejemplo n.º 2
0
 @Override
 public void ping() {
   if (canContinue == false) {
     terminate();
   } else if (pendingPreviewGenerator.isReady()) {
     pendingPreviewGenerator.generateBitmapFile();
     AppBroadcaster.broadcast(scontext.getContext(), AppBroadcaster.DB_SYNC_CHANGED);
     setState(new StateLoadNextGpx());
   }
 }
Ejemplo n.º 3
0
    @Override
    public void start() {
      scontext.getContext().unregisterReceiver(onFileChanged);

      if (database != null) {
        database.close();
      }

      setPendingGpxHandle(null);
      setPendingPreviewGenerator(null);

      AppBroadcaster.broadcast(scontext.getContext(), AppBroadcaster.DBSYNC_DONE);
    }
Ejemplo n.º 4
0
    @Override
    public void start() {
      AppBroadcaster.broadcast(scontext.getContext(), AppBroadcaster.DBSYNC_START);

      scontext.getBackgroundService().process(bgProcess);
    }
Ejemplo n.º 5
0
 @Override
 public void broadcast(Context context) {
   AppBroadcaster.broadcast(
       context, AppBroadcaster.FILE_CHANGED_INCACHE, directory.toString());
 }