Пример #1
0
 @Override
 public void run() {
   try {
     Init(null);
     cr = ctx.getContentResolver();
     int cnt = deleteFiles(dirUri, mList);
     sendResult(Utils.getOpReport(ctx, cnt, R.string.deleted));
   } catch (Exception e) {
     sendProgress(e.getMessage(), Commander.OPERATION_FAILED_REFRESH_REQUIRED);
   }
 }
Пример #2
0
 @Override
 public void run() {
   try {
     Init(null);
     cr = ctx.getContentResolver();
     int cnt = copyFiles(mList, destFolder);
     if (recipient != null) {
       sendReceiveReq(destFolder);
       return;
     }
     sendResult(Utils.getOpReport(owner.ctx, cnt, move ? R.string.moved : R.string.copied));
   } catch (Exception e) {
     sendProgress(e.getMessage(), Commander.OPERATION_FAILED_REFRESH_REQUIRED);
   }
 }
Пример #3
0
    @Override
    public void run() {
      sendProgress(ctx.getString(R.string.preparing), 0, 0);
      try {
        int l = iList.length;
        wakeLock.acquire();
        int num = copyFiles(iList, mDest);

        wakeLock.release();
        String report = Utils.getOpReport(ctx, num, move ? R.string.moved : R.string.copied);
        sendResult(report);
      } catch (Exception e) {
        sendProgress(e.getMessage(), Commander.OPERATION_FAILED_REFRESH_REQUIRED);
        return;
      }
    }
Пример #4
0
    @Override
    public void run() {
      sendProgress(ctx.getString(R.string.preparing), 0, 0);
      try {
        int l = fList.length;
        wakeLock.acquire();
        int num = copyFiles(fList, mDest);

        if (del_src_dir) {
          File src_dir = fList[0].getParentFile();
          if (src_dir != null) src_dir.delete();
        }
        wakeLock.release();
        // XXX: assume (move && !del_src_dir)==true when copy from app: to the FS
        if (delerr_counter == counter) move = false; // report as copy
        String report =
            Utils.getOpReport(ctx, num, move && !del_src_dir ? R.string.moved : R.string.copied);
        sendResult(report);
      } catch (Exception e) {
        sendProgress(e.getMessage(), Commander.OPERATION_FAILED_REFRESH_REQUIRED);
        return;
      }
    }