添加downloadOffText,检查下载上传数据是否完整
This commit is contained in:
@ -22,12 +22,12 @@ import com.gh.common.util.FileUtils;
|
||||
import com.gh.common.util.TokenUtils;
|
||||
import com.gh.common.view.CropImageCustom;
|
||||
|
||||
import org.apache.http.HttpStatus;
|
||||
import org.json.JSONException;
|
||||
import org.json.JSONObject;
|
||||
|
||||
import java.io.File;
|
||||
import java.lang.ref.SoftReference;
|
||||
import java.net.HttpURLConnection;
|
||||
|
||||
public class CropImageActivity extends BaseActivity {
|
||||
|
||||
@ -82,13 +82,13 @@ public class CropImageActivity extends BaseActivity {
|
||||
if (result != null) {
|
||||
try {
|
||||
int statusCode = result.getInt("statusCode");
|
||||
if (statusCode == HttpStatus.SC_OK) {
|
||||
if (statusCode == HttpURLConnection.HTTP_OK) {
|
||||
Intent data = new Intent();
|
||||
data.putExtra("url", result.getString("icon"));
|
||||
setResult(RESULT_OK, data);
|
||||
finish();
|
||||
handler.sendEmptyMessage(0);
|
||||
} else if (statusCode == HttpStatus.SC_FORBIDDEN
|
||||
} else if (statusCode == HttpURLConnection.HTTP_FORBIDDEN
|
||||
&& "too frequent".equals(result.getString("detail"))) {
|
||||
handler.sendEmptyMessage(2);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user