|
|
@ -33,6 +33,7 @@ import com.arialyy.aria.core.common.RequestEnum; |
|
|
|
import com.arialyy.aria.core.download.DownloadTarget; |
|
|
|
import com.arialyy.aria.core.download.DownloadTarget; |
|
|
|
import com.arialyy.aria.core.download.DownloadTask; |
|
|
|
import com.arialyy.aria.core.download.DownloadTask; |
|
|
|
import com.arialyy.aria.core.inf.IEntity; |
|
|
|
import com.arialyy.aria.core.inf.IEntity; |
|
|
|
|
|
|
|
import com.arialyy.aria.util.ALog; |
|
|
|
import com.arialyy.aria.util.CommonUtil; |
|
|
|
import com.arialyy.aria.util.CommonUtil; |
|
|
|
import com.arialyy.frame.util.show.L; |
|
|
|
import com.arialyy.frame.util.show.L; |
|
|
|
import com.arialyy.frame.util.show.T; |
|
|
|
import com.arialyy.frame.util.show.T; |
|
|
@ -130,6 +131,7 @@ public class SingleTaskActivity extends BaseActivity<ActivitySingleBinding> { |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
@Download.onTaskRunning protected void running(DownloadTask task) { |
|
|
|
@Download.onTaskRunning protected void running(DownloadTask task) { |
|
|
|
|
|
|
|
ALog.d(TAG, String.format("%s_running_%s", getClass().getName(), hashCode())); |
|
|
|
if (task.getKey().equals(DOWNLOAD_URL)) { |
|
|
|
if (task.getKey().equals(DOWNLOAD_URL)) { |
|
|
|
//Log.d(TAG, task.getKey());
|
|
|
|
//Log.d(TAG, task.getKey());
|
|
|
|
long len = task.getFileSize(); |
|
|
|
long len = task.getFileSize(); |
|
|
@ -220,8 +222,9 @@ public class SingleTaskActivity extends BaseActivity<ActivitySingleBinding> { |
|
|
|
startD(); |
|
|
|
startD(); |
|
|
|
break; |
|
|
|
break; |
|
|
|
case R.id.stop: |
|
|
|
case R.id.stop: |
|
|
|
Aria.download(this).load(DOWNLOAD_URL).stop(); |
|
|
|
//Aria.download(this).load(DOWNLOAD_URL).stop();
|
|
|
|
//startActivity(new Intent(this, SingleTaskActivity.class));
|
|
|
|
startActivity(new Intent(this, SingleTaskActivity.class)); |
|
|
|
|
|
|
|
Aria.download(this).unRegister(); |
|
|
|
//Aria.download(this).load(DOWNLOAD_URL).removeRecord();
|
|
|
|
//Aria.download(this).load(DOWNLOAD_URL).removeRecord();
|
|
|
|
break; |
|
|
|
break; |
|
|
|
case R.id.cancel: |
|
|
|
case R.id.cancel: |
|
|
|