fix bug
This commit is contained in:
3
.gitignore
vendored
3
.gitignore
vendored
@@ -13,4 +13,5 @@
|
||||
/.idea
|
||||
.idea
|
||||
/cache
|
||||
*.log
|
||||
*.log
|
||||
uml
|
@@ -288,8 +288,8 @@ import org.xml.sax.SAXException;
|
||||
"onStop");
|
||||
|
||||
if (isDestroyed) {
|
||||
ALog.w(TAG,
|
||||
"请不要在Activity或Fragment的onDestroy、finish、onStop等方法中调用Aria,Aria的unRegister会在Activity页面销毁时自动执行");
|
||||
ALog.e(TAG,
|
||||
"请不要在Activity或Fragment的onDestroy、finish、onStop等方法中注册Aria,Aria的unRegister会在Activity页面销毁时自动执行");
|
||||
}
|
||||
|
||||
if (obj instanceof Activity && isDestroyed) {
|
||||
|
@@ -207,6 +207,7 @@ public class DownloadReceiver extends AbsReceiver {
|
||||
|
||||
/**
|
||||
* 取消注册,如果是Activity或fragment,Aria会界面销毁时自动调用该方法。
|
||||
* 如果在activity中一定要调用该方法,那么请在onDestroy()中调用
|
||||
* 如果是Dialog或popupwindow,需要你在撤销界面时调用该方法
|
||||
*/
|
||||
@Override public void unRegister() {
|
||||
|
@@ -46,7 +46,7 @@ public class SingleTaskActivity extends BaseActivity<ActivitySingleBinding> {
|
||||
private static final String DOWNLOAD_URL =
|
||||
//"http://kotlinlang.org/docs/kotlin-docs.pdf";
|
||||
//"https://atom-installer.github.com/v1.13.0/AtomSetup.exe?s=1484074138&ext=.exe";
|
||||
//"http://static.gaoshouyou.com/d/22/94/822260b849944492caadd2983f9bb624.apk";
|
||||
"http://static.gaoshouyou.com/d/22/94/822260b849944492caadd2983f9bb624.apk";
|
||||
//"http://sitcac.daxincf.cn/wp-content/uploads/swift_vido/01/element.mp4_1";
|
||||
//"http://120.25.196.56:8000/filereq?id=15692406294&ipncid=105635&client=android&filename=20170819185541.avi";
|
||||
//"http://down2.xiaoshuofuwuqi.com/d/file/filetxt/20170608/14/%BA%DA%CE%D7%CA%A6%E1%C8%C6%F0.txt";
|
||||
@@ -58,7 +58,7 @@ public class SingleTaskActivity extends BaseActivity<ActivitySingleBinding> {
|
||||
//"http://ox.konsung.net:5555/ksdc-web/download/downloadFile/?fileName=ksdc_1.0.2.apk&rRange=0-";
|
||||
//"http://gdown.baidu.com/data/wisegame/0904344dee4a2d92/QQ_718.apk";
|
||||
//"http://qudao.5535.cn/one/game.html?game=531&cpsuser=xiaoeryu2";
|
||||
"https://bogoe-res.mytbz.com/tbzengsong/If You're Happy.mp3";
|
||||
//"https://bogoe-res.mytbz.com/tbzengsong/If You're Happy.mp3";
|
||||
//"http://ozr0ucjs5.bkt.clouddn.com/51_box-104_20180131202610.apk";
|
||||
@Bind(R.id.start) Button mStart;
|
||||
@Bind(R.id.stop) Button mStop;
|
||||
@@ -67,7 +67,7 @@ public class SingleTaskActivity extends BaseActivity<ActivitySingleBinding> {
|
||||
|
||||
@Override protected void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
Aria.download(this).register();
|
||||
Aria.upload(this).register();
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -240,4 +240,9 @@ public class SingleTaskActivity extends BaseActivity<ActivitySingleBinding> {
|
||||
super.onDestroy();
|
||||
//Aria.download(this).unRegister();
|
||||
}
|
||||
|
||||
@Override protected void onStop() {
|
||||
super.onStop();
|
||||
Aria.download(this).unRegister();
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user