|
|
@ -32,7 +32,7 @@ class DownloadService : BaseService() { |
|
|
|
intent.getIntExtra("start", 0), |
|
|
|
intent.getIntExtra("start", 0), |
|
|
|
intent.getIntExtra("end", 0) |
|
|
|
intent.getIntExtra("end", 0) |
|
|
|
) |
|
|
|
) |
|
|
|
Action.stop -> stopSelf() |
|
|
|
Action.stop -> stopDownload() |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
return super.onStartCommand(intent, flags, startId) |
|
|
|
return super.onStartCommand(intent, flags, startId) |
|
|
@ -75,6 +75,11 @@ class DownloadService : BaseService() { |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
private fun stopDownload() { |
|
|
|
|
|
|
|
tasks.clear() |
|
|
|
|
|
|
|
stopSelf() |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
/** |
|
|
|
* 更新通知 |
|
|
|
* 更新通知 |
|
|
|
*/ |
|
|
|
*/ |
|
|
|