pull/2/head
AriaLyy 8 years ago
parent 853571bc00
commit a842f74c6f
  1. 6
      downloadutil/src/main/java/com/arialyy/downloadutil/core/AMTarget.java
  2. 7
      downloadutil/src/main/java/com/arialyy/downloadutil/core/Aria.java
  3. 4
      downloadutil/src/main/java/com/arialyy/downloadutil/core/AriaManager.java

@ -7,4 +7,10 @@ public class AMTarget {
Context context; Context context;
OnSchedulerListener listener; OnSchedulerListener listener;
DownloadEntity entity; DownloadEntity entity;
//public DownloadManager load(DownloadEntity entity){
// this.entity = entity;
//}
} }

@ -42,9 +42,10 @@ public class Aria {
mDownloadManager = DownloadManager.init(context); mDownloadManager = DownloadManager.init(context);
} }
//public static AriaManager whit(Context context) { public static AMTarget whit(Context context) {
// return AriaManager.getInstance().get(context); AMTarget target = AriaManager.getInstance(context).get(context);
//} return target;
}
/** /**
* 开始下载 * 开始下载

@ -33,6 +33,10 @@ import java.util.Map;
return INSTANCE; return INSTANCE;
} }
public AMTarget get(Context context){
return getTarget(context);
}
private void putTarget(Context context) { private void putTarget(Context context) {
String clsName = context.getClass().getName(); String clsName = context.getClass().getName();
AMTarget target = mTargets.get(clsName); AMTarget target = mTargets.get(clsName);

Loading…
Cancel
Save