Skip to content

Commit 92fdf3a

Browse files
committed
see 05/22 log
1 parent 1aa6ee3 commit 92fdf3a

File tree

1 file changed

+13
-15
lines changed

1 file changed

+13
-15
lines changed

app/src/main/java/com/blankj/androidutilcode/helper/AssertHelper.java

Lines changed: 13 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,12 @@
11
package com.blankj.androidutilcode.helper;
22

33
import com.blankj.androidutilcode.Config;
4-
import com.blankj.subutil.util.ThreadPoolUtils;
54
import com.blankj.utilcode.util.FileIOUtils;
65
import com.blankj.utilcode.util.FileUtils;
76
import com.blankj.utilcode.util.LogUtils;
7+
import com.blankj.utilcode.util.ThreadUtils;
88
import com.blankj.utilcode.util.Utils;
99

10-
import java.io.IOException;
11-
1210
/**
1311
* <pre>
1412
* author: Blankj
@@ -21,19 +19,19 @@ public class AssertHelper {
2119

2220
public static void releaseInstallApk(final OnReleasedListener listener) {
2321
if (!FileUtils.isFileExists(Config.TEST_APK_PATH)) {
24-
ThreadPoolUtils poolUtils = new ThreadPoolUtils(ThreadPoolUtils.SingleThread, 1);
25-
poolUtils.execute(new Runnable() {
22+
ThreadUtils.executeByIo(new ThreadUtils.SimpleTask<Void>() {
2623
@Override
27-
public void run() {
28-
try {
29-
FileIOUtils.writeFileFromIS(
30-
Config.TEST_APK_PATH,
31-
Utils.getApp().getAssets().open("test_install"),
32-
false
33-
);
34-
} catch (IOException e) {
35-
e.printStackTrace();
36-
}
24+
public Void doInBackground() throws Throwable {
25+
FileIOUtils.writeFileFromIS(
26+
Config.TEST_APK_PATH,
27+
Utils.getApp().getAssets().open("test_install"),
28+
false
29+
);
30+
return null;
31+
}
32+
33+
@Override
34+
public void onSuccess(Void result) {
3735
if (listener != null) {
3836
listener.onReleased();
3937
}

0 commit comments

Comments
 (0)