EpgThirdPlayer v0.1.7版本的 MD5 值为:01b85d80b3df6a89b6193076bc73485f
以下内容为反编译后的 MockRequest.java 源代码,内容仅作参考
package com.ktcp.tencent.volley.mock;
import com.ktcp.tencent.volley.NetworkResponse;
import com.ktcp.tencent.volley.Request;
import com.ktcp.tencent.volley.Response;
import com.ktcp.tencent.volley.VolleyError;
import com.ktcp.tencent.volley.utils.CacheTestUtils;
import java.util.HashMap;
import java.util.Map;
public class MockRequest extends Request<byte[]> {
public boolean cancel_called;
public boolean deliverError_called;
public boolean deliverResponse_called;
private String mCacheKey;
private Map<String, String> mPostParams;
private Request.Priority mPriority;
public boolean parseResponse_called;
public MockRequest() {
super("http://foo.com", null);
this.mPostParams = new HashMap();
this.mCacheKey = super.getCacheKey();
this.deliverResponse_called = false;
this.parseResponse_called = false;
this.deliverError_called = false;
this.cancel_called = false;
this.mPriority = super.getPriority();
}
public MockRequest(String str, Response.ErrorListener errorListener) {
super(str, errorListener);
this.mPostParams = new HashMap();
this.mCacheKey = super.getCacheKey();
this.deliverResponse_called = false;
this.parseResponse_called = false;
this.deliverError_called = false;
this.cancel_called = false;
this.mPriority = super.getPriority();
}
public void setPostParams(Map<String, String> map) {
this.mPostParams = map;
}
@Override
public Map<String, String> getPostParams() {
return this.mPostParams;
}
public void setCacheKey(String str) {
this.mCacheKey = str;
}
@Override
public String getCacheKey() {
return this.mCacheKey;
}
@Override
public void deliverResponse(byte[] bArr, boolean z) {
this.deliverResponse_called = true;
}
@Override
public void deliverError(VolleyError volleyError) {
super.deliverError(volleyError);
this.deliverError_called = true;
}
@Override
public void cancel() {
this.cancel_called = true;
super.cancel();
}
public void setPriority(Request.Priority priority) {
this.mPriority = priority;
}
@Override
public Request.Priority getPriority() {
return this.mPriority;
}
@Override
public Response<byte[]> parseNetworkResponse(NetworkResponse networkResponse) {
this.parseResponse_called = true;
return Response.success(networkResponse.data, CacheTestUtils.makeRandomCacheEntry(networkResponse.data));
}
}