Commit 9e69c7e6 authored by liuyang's avatar liuyang

APK抓包>从频道1开始依次抓取, ftp上传优化

#BYLSERVER-1693
parent 0ab9467f
......@@ -13,7 +13,7 @@ android {
minSdkVersion 15
targetSdkVersion 22
versionCode 15
versionName "1.3.30"
versionName "1.4.40"
}
signingConfigs {
......
......@@ -105,6 +105,7 @@ class MainActivity : AppCompatActivity(), IAppBaseCallback {
}
private fun stop() {
Toast.makeText(this, "正在停止任务,请稍候...", Toast.LENGTH_SHORT).show()
stopRobot()
stopBtn.isEnabled = false
stopBtn.isFocusable = false
......
......@@ -91,6 +91,7 @@ class BylRobotService: Service(), IAppBaseCallback {
override fun onDestroy() {
Log.i(TAG, "destroy...")
super.onDestroy()
stopTask()
FtpManager.instance.stop()
LocalBroadcastManager.getInstance(this).unregisterReceiver(broadcastReceiver)
}
......
......@@ -22,6 +22,8 @@ class FtpManager {
fun start() {
Log.i(TAG, "ftp manager start...")
if (this.isRunning)
return
scheduleTime?.run { cancel() }
this.isRunning = true
scheduleTime = Timer()
......@@ -64,6 +66,7 @@ class FtpManager {
for (uploadTask in uploadTasks) {
cancelTask(uploadTask)
}
this.isRunning = false
}
}
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment