public void cancelDownload(String sign, OkDownloadEnqueueListener listener) {
   if (mDownloadRequests.get(sign) != null) {
     mDownloadRequests.remove(sign);
   }
   mOkDownloadManager.onCancel(sign, listener);
 }
 @Override
 public void onCreate() {
   super.onCreate();
   mOkDownloadManager = OkDownloadManager.getInstance(this);
 }
  public void download(final String sign, OkDownloadRequest request) {
    mOkDownloadManager.enqueue(
        request,
        new OkDownloadEnqueueListener() {
          @Override
          public void onStart(int id) {
            OkDownloadEnqueueListener listener = mListeners.get(sign);
            if (listener != null) {
              listener.onStart(id);
            }
          }

          @Override
          public void onProgress(int progress, long cacheSize, long totalSize) {
            //                Log.w(TAG, "onProgress: " + sign + "/" + progress);

            OkDownloadEnqueueListener listener = mListeners.get(sign);
            if (listener != null) {
              listener.onProgress(progress, cacheSize, totalSize);
            }
          }

          @Override
          public void onRestart() {
            Log.w(TAG, "onRestart: " + sign);

            OkDownloadEnqueueListener listener = mListeners.get(sign);
            if (listener != null) {
              listener.onRestart();
            }
          }

          @Override
          public void onPause() {
            Log.w(TAG, "onPause: " + sign);

            OkDownloadEnqueueListener listener = mListeners.get(sign);
            if (listener != null) {
              listener.onPause();
            }
          }

          @Override
          public void onCancel(String sign) {
            Log.w(TAG, "onCancel: " + sign);

            OkDownloadEnqueueListener listener = mListeners.get(sign);
            if (listener != null) {
              listener.onCancel(sign);
            }
            mDownloadRequests.remove(sign);
          }

          @Override
          public void onFinish(int id) {
            Log.w(TAG, "onFinish: " + id);

            OkDownloadEnqueueListener listener = mListeners.get(sign);
            if (listener != null) {
              listener.onFinish(id);
            }
            mDownloadRequests.remove(sign);
          }

          @Override
          public void onError(OkDownloadError error) {
            OkDownloadEnqueueListener listener = mListeners.get(sign);
            if (listener != null) {
              listener.onError(error);
            }
          }
        });
  }