提交 8d8a52de 编写于 作者: G guoshuyu

fix cache

上级 2d9932a9
......@@ -113,7 +113,11 @@ public class ProxyCacheManager implements ICacheManager, CacheListener {
@Override
public void release() {
if (proxy != null) {
try {
proxy.unregisterCacheListener(this);
} catch (Exception e) {
e.printStackTrace();
}
}
}
......
......@@ -387,7 +387,7 @@ public abstract class GSYVideoControlView extends GSYVideoView implements View.O
return;
}
if (mCurrentState == CURRENT_STATE_NORMAL) {
if (!mUrl.startsWith("file") && !CommonUtil.isWifiConnected(getActivityContext()) && mNeedShowWifiTip) {
if (isShowNetConfirm()) {
showWifiDialog();
return;
}
......@@ -800,8 +800,7 @@ public abstract class GSYVideoControlView extends GSYVideoView implements View.O
return;
}
if (mCurrentState == CURRENT_STATE_NORMAL || mCurrentState == CURRENT_STATE_ERROR) {
if (!mUrl.startsWith("file") && !mUrl.startsWith("android.resource") && !CommonUtil.isWifiConnected(getContext())
&& mNeedShowWifiTip) {
if (isShowNetConfirm()) {
showWifiDialog();
return;
}
......@@ -1005,6 +1004,11 @@ public abstract class GSYVideoControlView extends GSYVideoView implements View.O
}
protected boolean isShowNetConfirm() {
return !mUrl.startsWith("file") && !mUrl.startsWith("android.resource") && !CommonUtil.isWifiConnected(getContext())
&& mNeedShowWifiTip && !getGSYVideoManager().isCacheFile();
}
private class ProgressTimerTask extends TimerTask {
@Override
public void run() {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册