From 8039a1b2fbfa3471b6f726d3e839d7867c81a84f Mon Sep 17 00:00:00 2001 From: admin <weikou2014> Date: 星期六, 10 十月 2020 18:51:24 +0800 Subject: [PATCH] 资讯与小说集成 --- MDownloadProvider/src/com/mozillaonline/providers/downloads/DownloadThread.java | 34 ++++++++++++++-------------------- 1 files changed, 14 insertions(+), 20 deletions(-) diff --git a/MDownloadProvider/src/com/mozillaonline/providers/downloads/DownloadThread.java b/MDownloadProvider/src/com/mozillaonline/providers/downloads/DownloadThread.java index 0543b7c..1478249 100644 --- a/MDownloadProvider/src/com/mozillaonline/providers/downloads/DownloadThread.java +++ b/MDownloadProvider/src/com/mozillaonline/providers/downloads/DownloadThread.java @@ -16,20 +16,6 @@ package com.mozillaonline.providers.downloads; -import java.io.File; -import java.io.FileNotFoundException; -import java.io.FileOutputStream; -import java.io.IOException; -import java.io.InputStream; -import java.io.SyncFailedException; -import java.net.URI; -import java.net.URISyntaxException; -import java.util.Locale; - -import org.apache.http.Header; -import org.apache.http.HttpResponse; -import org.apache.http.client.methods.HttpGet; - import android.content.ContentValues; import android.content.Context; import android.net.http.AndroidHttpClient; @@ -41,7 +27,20 @@ import android.util.Pair; import android.widget.Toast; -import com.umeng.analytics.MobclickAgent; +import org.apache.http.Header; +import org.apache.http.HttpResponse; +import org.apache.http.client.methods.HttpGet; + +import java.io.File; +import java.io.FileNotFoundException; +import java.io.FileOutputStream; +import java.io.IOException; +import java.io.InputStream; +import java.io.SyncFailedException; +import java.net.URI; +import java.net.URISyntaxException; +import java.util.Locale; + /** * Runs an actual download @@ -320,7 +319,6 @@ if (state.mFilename != null && Downloads.isStatusError(finalStatus)) { new File(state.mFilename).delete(); state.mFilename = null; - MobclickAgent.reportError(mContext, "File delete status:" + finalStatus); } } @@ -335,18 +333,14 @@ } catch (FileNotFoundException ex) { Log.w(Constants.TAG, "file " + state.mFilename + " not found: " + ex); - MobclickAgent.reportError(mContext, ex); } catch (SyncFailedException ex) { Log.w(Constants.TAG, "file " + state.mFilename + " sync failed: " + ex); - MobclickAgent.reportError(mContext, ex); } catch (IOException ex) { Log.w(Constants.TAG, "IOException trying to sync " + state.mFilename + ": " + ex); - MobclickAgent.reportError(mContext, ex); } catch (RuntimeException ex) { Log.w(Constants.TAG, "exception while syncing file: ", ex); - MobclickAgent.reportError(mContext, ex); } finally { if (downloadedFileStream != null) { try { -- Gitblit v1.8.0