This commit is contained in:
AriaLyy
2016-12-02 19:24:11 +08:00
parent 853571bc00
commit a842f74c6f
3 changed files with 14 additions and 3 deletions

View File

@ -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;
//}
} }

View File

@ -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;
}
/** /**
* 开始下载 * 开始下载

View File

@ -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);