Commit d42d7239 authored by gaodapeng's avatar gaodapeng

还原了首帧生成的过程。

parent 0b0ac86b
......@@ -117,9 +117,9 @@ public class ImageVideoBanner extends FrameLayout implements ViewPager.OnPageCha
if (sExecutor == null) {
sExecutor = Executors.newScheduledThreadPool(5);
}
sExecutor.execute(new Runnable() {
Future<Boolean> submit = sExecutor.submit(new Callable<Boolean>() {
@Override
public void run() {
public Boolean call() {
try {
String url = bannerBean.getUrl();
if (!url.contains("android.resource")) {
......@@ -132,11 +132,19 @@ public class ImageVideoBanner extends FrameLayout implements ViewPager.OnPageCha
b.recycle();
mmr.release();
}
return true;
} catch (Exception e) {
e.printStackTrace();
return false;
}
}
});
try {
submit.get();
} catch (InterruptedException e) {
e.printStackTrace();
} catch (ExecutionException e) {
e.printStackTrace();
}
}
......
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